DEVELOPMENT OF A DECISION TOOL FOR GROUN DWATER MANAGEMENT By Stefanus Rainier Dennis THESIS Submitted in the fulfilment of the requirements for the degree of Doctor of Philosophy in the Faculty of Natural and Agricultural Sciences, Institute for Groundwater Studies, University of the Free State, Bloemfontein Promoter: Prof GJ van Tonder May 2007 So far as the laws of mathematics refer to reality, they are not certain. And so far as they are certain, they do not refer to reality. Albert Einstein ii Acknowledgements I hereby wish to express my sincere thanks to a large number of people who have inspired me to complete this thesis: • To my promoter Gerrit van Tonder, thank you for your guidance, advice and support throughout the project. • I gratefully express appreciation to all the lecturers at the Institute for Groundwater Studies for sharing their knowledge and expertise. • The research discussed in this thesis emanates from a project funded by the Department of Water Affairs and Forestry, entitled: “Geohydrological Software Development for Decision Support: Phase 1”. The financing of the project is appreciatively acknowledged. In addition, a special word of thanks to Sonia Veltman, Fanie Botha, Malcolm Watson and Chris Moseki – your recommendations and inputs have been invaluable. • There are many experts in groundwater and risk that made a large contribution to ensure that the decision tool yields expected results; they are Alkie Marias, Gawie van Dyk, Mike Smart, Christian Vermaak, Cedric Nelson, Brent Usher and Etienne Mouton. Thank you for all your advice and hours spent checking various components of the South African Decision Tool. • A special word of thanks to my parents for all your support, encouragement and understanding throughout the project. • To my dear wife, thank you for all your love and encouragement. • Last but not least my Heavenly Father, without Him at my side I would not have been able to complete this thesis. iii Table of Contents Acknowledgements .............................................................................................................. iii  Table of Contents .................................................................................................................. iv  List of Figures ...................................................................................................................... vii  List of Tables ..........................................................................................................................x   List of Abbreviations ............................................................................................................ xi  List of Measurement Units .................................................................................................. xii  1  Introduction ...................................................................................................................... 1  1.1  Preface .................................................................................................................... 1  1.2  Background of the South African Groundwater Decision Tool ................................ 2  1.3  Structure of this Thesis ............................................................................................ 3  2  Groundwater Management .............................................................................................. 4  2.1  Introduction.............................................................................................................. 4  2.2  International trends in Groundwater Management .................................................. 4  2.2.1  Background ......................................................................................................... 4  2.2.2  Degradation of Groundwater Resources ............................................................. 5  2.2.3  Gaps in Groundwater Management .................................................................... 7  2.3  Groundwater Management in South Africa ............................................................. 8  2.3.1  Introduction .......................................................................................................... 8  2.3.2  Foundations of Water Management in South Africa ............................................ 8  2.3.3  Degradation of Groundwater Resources in South Africa .................................. 10  3  Fuzzy Logic versus Classical Logic ............................................................................... 12  3.1  Introduction............................................................................................................ 12  3.2  Classical (Crisp) Logic ........................................................................................... 12  3.2.1  What is Classical Logic? ................................................................................... 12  3.2.2  Crisp Sets .......................................................................................................... 13  3.2.3  Boolean Operators ............................................................................................ 13  3.3  Fuzzy Logic ........................................................................................................... 16  3.3.1  History of Fuzzy Logic ....................................................................................... 16  3.3.2  What is Fuzzy Logic? ........................................................................................ 17  3.3.3  Elementary Fuzzy Logic and Fuzzy Propositions .............................................. 20  3.3.4  Fuzzy Sets ......................................................................................................... 20  3.3.5  Algebra of Fuzzy Sets ....................................................................................... 23  3.3.6  Comparing Fuzzy Numbers ............................................................................... 25  3.3.7  Fuzzification and Defuzzification ....................................................................... 25  4  Risk Analysis and Decision Making ............................................................................... 32  iv 4.1  Introduction............................................................................................................ 32  4.2  Risk Analysis ......................................................................................................... 32  4.2.1  Introduction ........................................................................................................ 32  4.2.2  Defining Risk ..................................................................................................... 32  4.2.3  Analysing and Quantifying Risks ....................................................................... 33  4.3  Fuzzy Logic Risk Analysis ..................................................................................... 34  4.3.1  Inadequacy of the “Utility Measure” of Risk ....................................................... 34  4.3.2  Fuzzy Logic Risk Theory ................................................................................... 35  4.3.3  Model Validation and Uncertainty ...................................................................... 38  4.3.4  Sensitivity Analysis ............................................................................................ 39  4.4  Decision Making .................................................................................................... 41  4.4.1  Steps involved in decision making .................................................................... 41  4.4.2  Role of risk analysis in decision making ............................................................ 42  4.4.3  The Role of the SAGDT in Decision Making ..................................................... 43  5  Development of the South African Groundwater Decision Tool .................................... 44  5.1  Introduction............................................................................................................ 44  5.2  Overview of the System ........................................................................................ 44  5.2.1  Introduction to the SAGDT ................................................................................ 44  5.2.2  SAGDT Graphical User Interface ...................................................................... 45  5.2.3  GISViewer OCX Control .................................................................................... 57  5.3  Unified Modelling Language (UML) ....................................................................... 80  5.3.1  Use Case View Symbols ................................................................................... 81  5.3.2  Logical View Symbols ....................................................................................... 82  5.3.3  Rules of Abstraction .......................................................................................... 83  5.4  Software Functionality and Design ........................................................................ 84  5.4.1  Functional Categories ....................................................................................... 84  5.4.2  Application Framework ...................................................................................... 85  5.4.3  Access Control .................................................................................................. 95  5.4.4  General GUI Features ....................................................................................... 96  5.4.5  GIS Utility .......................................................................................................... 99  5.4.6  Risk Assessment ............................................................................................. 101  5.4.7  Assessment Manager ...................................................................................... 105  5.4.8  3rd Party Software ............................................................................................ 131  6  Case Studies ............................................................................................................... 133  6.1  Introduction.......................................................................................................... 133  6.2  General Modelling Parameters ............................................................................ 133  6.3  VULNERABILITY: Fish River Lighthouse (Mouton, 2006) .................................. 134  v 6.3.1  Background ..................................................................................................... 134  6.3.2  Assumptions .................................................................................................... 141  6.3.3  Modelling Methodology ................................................................................... 142  6.3.4  Results ............................................................................................................ 143  6.3.5  Conclusions and Recommendations ............................................................... 146  6.4  WASTE SITE: Bloemfontein Suidstort (Geo Pollution Technologies, 2005) ....... 147  6.4.1  Background ..................................................................................................... 147  6.4.2  Hydrochemistry ............................................................................................... 151  6.4.3  Assumptions .................................................................................................... 151  6.4.4  Modelling Methodology ................................................................................... 151  6.4.5  Results ............................................................................................................ 152  6.4.6  Conclusions ..................................................................................................... 158  6.5  SUSTAINABILITY: De Hoop (Tinghitsi, 2006) .................................................... 159  6.5.1  Background ..................................................................................................... 159  6.5.2  Assumptions .................................................................................................... 162  6.5.3  Modelling Methodology ................................................................................... 162  6.5.4  Results ............................................................................................................ 163  6.5.5  Conclusions ..................................................................................................... 167  6.6  MINE: Van Tonder Coal Mine (Van Tonder et al, 2006) ..................................... 168  6.6.1  Background ..................................................................................................... 168  6.6.2  Modelling Methodology ................................................................................... 170  6.6.3  Results ............................................................................................................ 171  7  Conclusions and Recommendations ........................................................................... 178  8  References .................................................................................................................. 181  Appendix A: Use Case Diagrams ....................................................................................... 187  9  Appendix B: Logical View Diagram .............................................................................. 188  Appendix C: Fuzzy Logic Rules and Member Functions .................................................... 189  Summary ............................................................................................................................. 195  Opsomming ......................................................................................................................... 197  vi List of Figures Figure 1: Crisp Sets (no pun intended) ................................................................................. 13  Figure 2: Graphic representation of AND, OR and NOT operators (Source Matlab, 2002) .. 14  Figure 3: Precision versus significance (Source Matlab, 2002) ............................................ 18  Figure 4: Mapping of input and output (Source Matlab, 2002) .............................................. 19  Figure 5: Fuzzy set (McNeill and Thro, 1994) ....................................................................... 21  Figure 6: Membership function for a triangular fuzzy and crisp "5" ....................................... 23  Figure 7: Fuzzy inference system (Fuzzy Logic Fundamentals, 2007) ................................. 26  Figure 8: Membership functions of linguistic variable Storativity, with an input fuzzy number Sfractured to be fuzzified ........................................................................................................... 27  Figure 9: Membership functions of linguistic values in linguistic variable Storativity using the AND operator ........................................................................................................................ 29  Figure 10: Aggregated membership functions of linguistic values in linguistic variable Storativity using the OR operator .......................................................................................... 30  Figure 11: Centroid defuzzification (Fuzzy Logic Fundamentals, 2007) ............................... 31  Figure 12: Examples of membership functions ..................................................................... 35  Figure 13: Fuzzification of risk model inputs ......................................................................... 37  Figure 14: High Level System Architecture ........................................................................... 45  Figure 15: SAGDT Assessment Interface (CAD Environment) ............................................. 46  Figure 16: SAGDT Status bar ............................................................................................... 48  Figure 17: Assessment Interface Legend ............................................................................. 50  Figure 18: Example of Area Object Properties ..................................................................... 54  Figure 19: Example of Analysis Results ............................................................................... 56  Figure 20: Example of Sensitivity Analysis ........................................................................... 56  Figure 21: Assessment Interface Statusbar .......................................................................... 57  Figure 22: XML File Format .................................................................................................. 59  Figure 23: SAGDT GIS Interface (Spatial Information) ......................................................... 69  Figure 24: Spatial Information Legend .................................................................................. 70  Figure 25: Spatial Information Locality Map .......................................................................... 78  Figure 26: Main Map Popup Menu ........................................................................................ 78  Figure 27: Spatial Information Data Tab ............................................................................... 79  Figure 28: Spatial Information Status bar ............................................................................. 80  Figure 29: Use Case Symbols (Object Management Group, 2007) ..................................... 81  Figure 30: Logical View Symbols (Object Management Group, 2007) ................................. 82  Figure 31: Use Case Diagram - Top Level Functionalities ................................................... 85  Figure 32: Use Case Diagram - Application Framework ....................................................... 85  vii Figure 33: SAGDT Deployment Structure ............................................................................. 86  Figure 34: SAGDT Deployment Structure continued ............................................................ 87  Figure 35: GRAII Database Structure ................................................................................... 88  Figure 36: SAGDT database tables ...................................................................................... 88  Figure 37: Effects of different weighting exponents (Source Chaing and Kinzelbach, 1998) 90  Figure 38: Model Drawdown vs. Corrected Drawdown ......................................................... 92  Figure 39: SAGDT backdoor ................................................................................................. 93  Figure 40: Fuzzy Logic tree structure example ..................................................................... 93  Figure 41: Use Case Diagram - Access Control ................................................................... 95  Figure 42: SAGDT Registration Dialog ................................................................................. 96  Figure 43: Use Case Diagram - General GUI Features ........................................................ 96  Figure 44: Use Case Diagram - GIS Utility ........................................................................... 99  Figure 45: Example of visualisation of query results ........................................................... 100  Figure 46: Use Case Diagram - Risk Assessment .............................................................. 102  Figure 47: Risk Assessement Model .................................................................................. 104  Figure 48: Use Case Diagram - Assessment Manager ...................................................... 106  Figure 49: Creating the assessment area object ................................................................ 107  Figure 50: Example of Object Definition ............................................................................. 129  Figure 51: Use Case Diagram - 3rd Party Software ........................................................... 131  Figure 52: Fish River Lighthouse (Carpe Diem) study area ................................................ 135  Figure 53: Fish River Lighthouse NW-SE cross section ..................................................... 136  Figure 54: Fish River Lighthouse SW-NE cross section ..................................................... 137  Figure 55: Fish River Lighthouse hydrocensus positions ................................................... 139  Figure 56: Fish River Lighthouse borehole elevations vs. borehole water levels ............... 140  Figure 57: Fish River Lighthouse model NW-SE cross section .......................................... 140  Figure 58: Fish River Lighthouse conceptual hydrogeological model ................................. 141  Figure 59: Fish River Lighthouse scenario layout ............................................................... 143  Figure 60: Fish River Lighthouse borehole 19 Cooper-Jacob fit ......................................... 144  Figure 61: Fish River Lighthouse aquifer vulnerability sensitivity analysis ......................... 145  Figure 62: Fish River Lighthouse drawdown curves for borehole 1 and 19 ........................ 145  Figure 63: Suidstort study area ........................................................................................... 147  Figure 64: Suidstort and Ferreira geology map .................................................................. 148  Figure 65: Suidstort elevations vs. water levels ................................................................. 150  Figure 66: Suidstort scenario layout ................................................................................... 152  Figure 67: Suidstort waste site sensitivity analysis ............................................................. 153  Figure 68: Suidstort pulme movement after 50 years ......................................................... 154  Figure 69: Suidstort virtual boreholes ................................................................................. 155  viii Figure 70: Suidstort boreholes intersecting the sill ............................................................. 156  Figure 71: Suidstort correlation of the actual and simulated borehole EC values .............. 157  Figure 72: Suidstort irrigation pollution risk ......................................................................... 158  Figure 73: De Hoop study area ........................................................................................... 159  Figure 74: De Hoop elevations vs. water levels .................................................................. 161  Figure 75: De Hoop scenario layout ................................................................................... 163  Figure 76: De Hoop example of sustainability sensitivity analysis ...................................... 164  Figure 77: De Hoop water level profile position .................................................................. 165  Figure 78: De Hoop water level profile (360 days) .............................................................. 166  Figure 79: De Hoop area drawdown curves ....................................................................... 166  Figure 80: Van Tonder opencast study area ....................................................................... 168  Figure 81: Van Tonder opencast elevations vs. water level ............................................... 169  Figure 82: Van Tonder opencast scenario layout ............................................................... 171  Figure 83: VanTonder opencast object properties .............................................................. 172  Figure 84: Van Tonder opencast SO4 probe position ......................................................... 173  Figure 85: Van Tonder opencast SO4 probe data .............................................................. 173  Figure 86: Van Tonder opencast pollution plume – Year 1 ................................................. 174  Figure 87: Van Tonder opencast pollution plume - Year 5 ................................................. 175  Figure 88: Van Tonder opencast pollution plume - Year 10 ............................................... 175  Figure 89: Van Tonder opencast pollution plume - Year 20 ............................................... 176  Figure 90: Van Tonder opencast pollution plume - Year 30 ............................................... 176  ix List of Tables Table 1: Truth table for classical logic ................................................................................... 14  Table 2: Decision rules for three inputs ................................................................................ 36  Table 3: Comparison of Risk and Decision Analysis ............................................................ 42  Table 4: SAGDT Main Menu Functions ................................................................................ 47  Table 5: Assessment Interface Toolbar ................................................................................ 49  Table 6: System Generated Legend Objects for Assessment Interface ............................... 51  Table 7: Assessment Interface Scenario Objects ................................................................. 52  Table 8: Tree Popup Functionality ........................................................................................ 54  Table 9: Property Legend ..................................................................................................... 55  Table 10: Object Property Popup Menu ................................................................................ 55  Table 11: Spatial Information Toolbar ................................................................................... 61  Table 12: Legend Image Descriptions .................................................................................. 70  Table 13: Legend Popup Menu ............................................................................................. 72  Table 14: Legend Node Type Popup Menu Items ................................................................ 77  Table 15: Library toolbar ....................................................................................................... 95  Table 16: Fish River Lighthouse hydrocensus .................................................................... 138  Table 17: Ferreira hydrosensus .......................................................................................... 149  Table 18: Suidstort borehole actual and simulated EC values ........................................... 156  Table 19: De Hoop area hydrocensus data ........................................................................ 160  Table 20: De Hoop area water use ..................................................................................... 161  Table 21: Sustainability risks for Amandelboom, De Hoop and Whiteside ......................... 163  Table 22: Sustainability risks for Whiteside ........................................................................ 164  x List of Abbreviations AI Artificial Intelligence ASCII American Standard Code for Information Interchange AVI Audio Video Interleave CAD Computer Aided Design CSV Comma Separated Values DAO Data Access Objects DEAT Department of Environmental Affairs and Tourism DWAF Department of Water Affairs and Forestry EPA Environmental Protection Agency ESRI Environmental Systems Research Institute Extended Model for Aquifer Recharge and Soil Moisture Transport EARTH through the Saturated Hardrock FAO Food and Agriculture Organisation GDT Groundwater Decision Tool GIS Geographic Information System GRA Groundwater Resource Assessment GRDM Groundwater Resource Directed Measures GUI Graphical User Interface GSDDS Geohydrological Software Development for Decision Support IWRP Integrated Water Resource Planning MAX Maximum MIN Minimum MOLT Map Objects Lite NGDB National Groundwater Data Base NWA National Water Act (Act 36 of 1998) NWRS National Water Resource Strategy OCX OLE (Object Linking and Embedding) Control Extension OLE Object Linking and Embedding PDF Portable Document Format SAGDT South African Groundwater Decision Tool SAISE South African Institute for Civil Engineers UML Unified Modelling Language UNESCO United Nations Educational, Scientific and Cultural Organization XML eXtensible Markup Language xi List of Measurement Units Unit Description cfu/100ml colony forming units per 100 millilitres ha Hectares km Kilometre km² Square kilometre l/s Litres per second m Metre m-1 Per metre m² Square metres m2/d Metres squared per day m3/a Cubic metres per annum mamsl Metres above mean sea level mbgl Metres below ground level mg/l Milligram per litre mm Millimetre mm/a Millimetre per annum Mm3/a Million cubic metres mS/m Milli-siemens per metre TDS Total Dissolved Solids xii 1 Introduction 1.1 Preface “This is another option which we as a country need to exploit in areas that have enough groundwater. Let us use innovation, science and technology to open new horizons for better water use in a water scarce country such as South Africa . . . ” (BP Sonjica, Minister of Water Affairs and Forestry, 2006). Water in South Africa is becoming a scarce and important resource and therefore has to be managed and protected in order to ensure sustainability, equity and efficiency. These are the central guiding principles in the protection, use, development, conservation, management and control of water resources. The South African Groundwater Decision Tool (SAGDT) was developed to incorporate appropriate groundwater science and technology into a management platform. Informed decisions can then be made when considering groundwater options and as a result open new horizons for better water use in South Africa. The SAGDT is designed to provide methods and tools to assist groundwater professionals and regulators in making informed decisions, while taking into account that groundwater forms part of an integrated water resource. The SAGDT is spatially-based software, which includes: • A geographic information system (GIS) interface allows a user to import shape files, various computer aided design (CAD) formats and geo-referenced images. The GIS interface also provides for spatial queries to assist in the decision-making process. The GIS interface contains default data sets in the form of shape files and grid files depicting various hydrogeological parameters across South Africa. • A risk analysis interface introduces fuzzy logic based risk analysis to assist in decision making by systematically considering all possibilities. Risks relate to the sustainability of a groundwater resource, vulnerability of an aquifer, pollution of a groundwater resource (including seawater intrusion), human health risks associated with a polluted groundwater resource, impacts of changes in groundwater on aquatic ecosystems and waste site impacts on an area. • Third-party software such as a shape file editor, an interpolator, a georeference tool, a unit converter and a groundwater dictionary (which includes a definition, a description of 1 why the term is important and illustrative graphics to assist in understanding the terminology). • A report generator, which automatically generates documentation concerning the results of the risk analysis performed and the input values for the risk analysis. • A scenario wizard for the novice to obtain step by step instructions in setting up a scenario. • The SAGDT allows problem solving at a regional scale or a local scale, depending on the problem at hand. This thesis discusses the origin, research, development and implementation of the SAGDT. The SAGDT is not the first application of fuzzy logic to risk assessments, but the SAGDT features a generic object model which supports a dynamic risk-based model using a real time expression parser, making the risk model scalable without the need to change source code. 1.2 Background of the South African Groundwater Decision Tool The SAGDT evolved from the Groundwater Decision Tool (GDT) developed by the Water Research Commission (Dennis et al., 2002). The GDT application employs fuzzy logic for risk assessments in the following areas: groundwater sustainability, groundwater pollution, health and ecological environment. Each risk assessment was conducted on three distinct tiers i.e.: rapid, intermediate and comprehensive, where each successive level has a higher confidence. The application also has a database of several remediation techniques, the functionality to calculate borehole protection zones, and includes a basic cost-benefit analysis tool. The GDT was not spatially-based, as all data were entered in fixed dialogs and no scenario building capability was supported. In 2004, the Chief Directorate: Integrated Water Resource Planning (IWRP), Department of Water Affairs and Forestry (DWAF) initiated a project entitled: Geohydrological Software Development For Decision Support: Phase 1 (GSDDS: Phase 1). The aims of this project are to integrate current and new groundwater related tools, to enable Water Resource Managers to make sound decisions based on scientifically defendable rules and methodologies. Tools of this nature will contribute towards the integration of groundwater aspects into the hydrological systems and planning modelling software, which currently forms the basis of resource evaluation and development options for water resources in South Africa. 2 The GDT was identified as a potential tool to be included in this project. However there were numerous shortcomings, such as: • The software was not spatially based, hence it could not model scenarios with very high complexity. Analytical equations were for example used to calculate drawdown and the movement of a pollution plume. • Data included in the software had to be updated, since the release of the GRAII data (Groundwater Resource Assessment Phase 2) • Fuzzy logic rule sets were outdated. • Fixed tiers used in the GDT had to be discarded. • The GDT did not include sensitivity and confidence analyses. • Risks were only focused on either sustainability, pollution, health or the ecosystems. The GDT, because of the above-mentioned shortcomings, was re-engineered and expanded to form the SAGDT. 1.3 Structure of this Thesis The migration of the GDT to the SAGDT is the focus of this thesis. The thesis is therefore divided into the following sections: • The first section (Chapter 2) addresses groundwater management and more specifically the evolvement of groundwater management in South Africa, with the implementation of the National Water Act (1998). • The second section (Chapter 3) introduces the reader to fuzzy logic, the history thereof and how fuzzy logic generalises classical logic. • The third section (Chapter 4) introduces risk analysis and decision making. Definitions of risk, assessing and quantifying risks, fuzzy logic based risk analyses, model validation, sensitivity analyses and decision making are reviewed. • Chapter 5 introduces the SAGDT software design and the various components constituting the SAGDT framework. • Four case studies are presented in Chapter 6. These include a waste site, water supply, sustainability study and a mining scenario. Each of these have been tested and approved by specialists in the field. • In the last section (Chapter 7), conclusions are drawn and recommendations provided. 3 2 Groundwater Management 2.1 Introduction “We cannot fail our people in their quest for a better life. We need to give them water and we need to ensure that water plays its role in our socio-economic development. It is therefore a priority for us to manage our water so that we are able to balance the social needs of our people. Especially those who have been denied access to water in the past; with our economic needs, as water is a key ingredient in economic growth” (LB Hendricks, Minister of Water Affairs and Forestry, 2007). Internationally, groundwater is the primary source of water for drinking and irrigation. In fact, more than two billion people worldwide depend on groundwater for their daily water supply (Groundwater Management, 2007). It is a unique resource, widely available and provides security against droughts. Groundwater has minimal evaporation losses and low costs of development, which make groundwater more attractive when compared to other sources. At the same time population and economic growth have led to great demands on the world's groundwater resources. In many countries, there are already significant impacts due to inadequately regulated groundwater management. An analysis of current practices might lead to the conclusion that there is no effective system of groundwater management. It is a rare exception when wells are closed down and capped off to prevent abstraction, or limits set on pumping durations or volumes (FAO Land and Water Development Division et al., 2003). Warnings of a groundwater crisis (with falling groundwater tables and polluted aquifers) have led to many governments and local authorities finally realising the importance of sound groundwater management practices. 2.2 International trends in Groundwater Management 2.2.1 Background The use of the world’s groundwater resources is intensifying, with little or no prospect for resolving the detrimental impacts through conventional management approaches. Competent United Nations Agencies maintain that these issues have to be addressed within the specific contexts of the hydrogeological settings. 4 The variable patterns of groundwater use and the varied services that aquifer systems provide do not form a clear aggregate picture or status of groundwater and they do not present an opportunity for systematic management response. Despite the highly technical work that is carried out and presented in hydrogeological literature, the status of knowledge of the aquifer systems is often limited to the level at which a management response is required. Highly detailed studies in contaminant transport are carried out in high-value settings usually, because regulatory systems are enforced (FAO Land and Water Development Division et al., 2003). Failure to recognise the variability and range of these physical limits (and the range of services that groundwater provide), together with the demands placed upon groundwater systems, will continue to result in ineffective management responses. In this sense, groundwater management is required to be highly localised, and to a far greater degree than that applied to surface water management. There are many international documents available concerning the management of groundwater resources (for example Foster et al., 1998 and 2002; Boulding, 1995, Carsel et al., 1985, Environmental Protection Agency, 2001). However most of the approaches discussed in the international literature assume that the resource is to be managed rather than utilised. 2.2.2 Degradation of Groundwater Resources The main issues resulting in the degradation of groundwater are (FAO Land and Water Development Division et al., 2003): 1. Over-abstraction and water level declines can lead to a wide array of consequences which include: • Critical changes in patterns of groundwater flow to and from adjacent aquifer systems. • Declines in base flows, spring flows and wetlands, etc. with consequent damage to ecosystems and downstream users. • Increased pumping costs and energy usage. • Land subsidence and damage to surface infrastructure. • Reduction in access to water for drinking, irrigation and other uses, particularly for the poor. 5 2. Vulnerability to declines in groundwater levels as a result of increased groundwater abstraction. These include: • Coastal zones: Intrusion of saline seawater is a common result of pumping, particularly in locations where sediments are highly permeable. • Inter-bedded high and low quality aquifers: In many locations, aquifers containing high and low quality water are inter-layered. • Locations where low quality water is present on the surface or in adjacent rock formations. Pumping often causes the migration of low quality water. • Locations where rock formations allow rapid flow. Water flows much more rapidly through karstic limestone or other rock formations, where large interconnected fractures or cavities are present. These locations tend to be much more vulnerable to pollution. • Locations where the geochemistry of adjacent waters and/or the geological formations is incompatible. Groundwater geochemistry often differs. This can result in a wide variety of chemical reactions when water containing different levels of key constituents or having differing pH or redox potentials is drawn into and mixes with water in pumped aquifers. 3. Rising groundwater levels and water logging: • Water logging induced by irrigation: Rising groundwater levels due to surface irrigation systems have fundamental implications, for example irrigation-induced salinity and water logging reduce crop yields. • Water level rises under urban areas: Water level rises are a major feature in many urban areas, particularly once cities begin to rely on imported water supplies. Although urbanisation may reduce direct infiltration of rainfall because of the large impermeable area created, recharge (often due to leaking sewers and water mains) below cities is often far higher than pre-urban levels. • Water level changes in response to vegetation cover: Land use changes can have a significant impact on groundwater levels. Forest and vegetation cover have long been recognised as major factors influencing run-off, infiltration and evapotranspiration from shallow water tables. Plant cover is widely used as a way of reducing run-off and increasing infiltration. 4. Pollution is widely recognised as one of the most serious challenges to the sustainable management of groundwater resources. The significance of pollution for groundwater resources is increased by the long time scale at which processes are 6 affecting groundwater function. There are three main sources of groundwater pollution, namely: • Agricultural pollution: Aside from non-point-source considerations, it is important to recognise that nitrate and other nutrient pollution in groundwater is often related to agricultural practices other than the use of chemical fertilisers. Any location where animal wastes are concentrated, such as feedlots or poultry farms, can release high levels of nutrients into groundwater. In addition to nutrients, pesticides and herbicides are other major sources of groundwater pollution related to agriculture. • Urban groundwater pollution: The additional recharge in urban areas is derived principally from leaking sewers and other wastewater sources. Much of this represents polluted recharge to groundwater. Direct leakage of wastewater to groundwater in developing countries is probably much higher. • Industrial pollutants: Industrial activities (including mining) have polluted large areas. One must not forget the importance of dispersed sources of industrial pollutants such as trace metals and organic solvents. Because of their low solubility in water, many such pollutants have extremely long residence times in aquifers. Because they do not dissolve rapidly, they can remain indefinitely as a concentrated source of pollution within an aquifer. An example is underground storage tanks. 2.2.3 Gaps in Groundwater Management An analysis of current practices might lead to the conclusion that there is no current effective system of groundwater management (FAO Land and Water Development Division et al., 2003). The variable patterns of groundwater use and the varied services that aquifer systems provide do not form a clear aggregate picture or status of groundwater, nor do they present an opportunity for systematic management response. Despite the highly technical work that is carried out and presented in the hydrogeological literature, the status of knowledge of the aquifer systems is often limited to the level at which a management response is required by governing authorities. FAO Land and Water Development Division et al. (2003) have identified several gaps in groundwater management, each with significant implications for sustainable development: • The inability to cope with the acceleration of degradation of groundwater systems by over-abstraction and effective resource depletion through quality changes. 7 • In general, a lack of professional and public awareness about the sustainable use of groundwater resources. In particular, a lack of coherent planning frameworks to guide all scales of groundwater development and management. • The failure to resolve competition for groundwater services between sectoral uses and environmental externalities. United Nations Educational, Scientific and Cultural Organisation (UNESCO) (2000) initiatives for groundwater management have focused on: • Hydrogeological information • Research and analysis and their role in integrated water resource management (including risk analysis and trans-boundary aspects). 2.3 Groundwater Management in South Africa 2.3.1 Introduction Botha (2005) discusses the almost 150-year history of groundwater in South Africa. Groundwater drilling started in the 1870’s for government operations. Later groundwater became more popular in the private sector and farming communities. There was no legislation related to groundwater until 1956 when the first South African Water Act was published. In this Act, groundwater was isolated in policy and regulation, partly as a result of the private status of groundwater. It received virtually no protection, except in the so-called “Government Subterranean Water Control Areas”. However the focus on groundwater was initiated in the 1970’s with the establishment of a Geohydrological Directorate at the DWAF. A change in government in 1994 was opportune to address the shortcomings of existing legislation and the water needs of the country. The introduction of a new National Water Act (NWA) in 1998 and the recognition of South Africa becoming a water-scarce country therefore placed a new emphasis on groundwater and the associated integrated management. 2.3.2 Foundations of Water Management in South Africa The Constitution is the highest law in South Africa and all other laws must be aligned with it. The Constitution of South Africa (1996) states: 8 “Everybody has the right to an environment not harmful to their health and well-being, to have an environment protected for the benefit of present and future generations, and to have access to sufficient food and water . . .” As a result, the Constitution and Agenda 21 (which is an international plan for sustainable development to which South Africa is a signatory) formed the basis for water management in South Africa. To implement water policy, two new acts were drafted and signed into law: • National Water Act (1998): This Act deals with the management of water resources, and its purpose is to ensure that there will be water for basic human needs and for the economic development of the country. The NWA recognises the interdependency of all the components of the water cycle, and that these should be managed as a single resource. • Water Services Act (1997): This Act provides the right to access to basic water supply and sanitation and provides the framework for delivery of these water services to the people of the country. South Africa is not a water-rich country and as a result, water has to be managed and used wisely. Water management in South Africa is based on three key principles (GRDM Manual, 2005): • Sustainability – water use must promote social and economic development, but not at the expense of sustaining the environment (technical component). • Equity – every citizen of the country must have access to water and the benefit of using water (social component). • Efficiency – water must not be wasted and must be used to the best possible social and economic advantage (economic component). The NWA requires water management strategies to be addressed at both the national and catchment level. In order to achieve this, a National Water Resource Strategy (NWRS) (DWAF, 2004) was developed as a framework for managing water resources in the country. The strategy describes the ways in which all water resources will be protected, used, developed, conserved, managed and controlled. The NWA requires a balance between use and protection. The NWRS aims to provide a framework in which this balance can be attained. The Minister of Water Affairs and Forestry is the public trustee of water resources and has the overall responsibility for all aspects of water management. However, responsibility and 9 authority for water management will eventually be devolved to a local level. It is projected that DWAF will ultimately provide a national policy and a regulatory framework for water resource management and will make sure that other water institutions are effective. To achieve these objectives, DWAF is currently formulating a National Groundwater Strategy. The following issues relating to the current management of groundwater resources are to be addressed in this groundwater strategy (DWAF, 2007): • Full integration of groundwater resources into water resource management. • Poor understanding of groundwater resources and their relationship with surface water. • The strongly negative perceptions concerning groundwater related issues. • Inadequate capacity to manage groundwater resources. • Inadequate monitoring of groundwater abstraction and use. • Inadequate financial investment in groundwater management. • Management of groundwater impacts due to mining activities. • Susceptibility of groundwater to pollution. • Irreversible damage of groundwater resources due to over-abstraction. • Inefficiencies that can arise due to under-utilisation of groundwater resources. • Poor aquifer development, leading to unreliable water supply. The SAGDT is envisioned as a DWAF-supported tool for groundwater resource management. Before the management of any resource is undertaken, it is important to understand the resource as well as the risks involved. The SAGDT will aid in understanding groundwater systems, as well as identifying and quantifying the associated risks. This is accomplished through the simulation of scenarios. SAGDT training is already an accredited course recognised by the South African Institute for Civil Engineers (SAISE). 2.3.3 Degradation of Groundwater Resources in South Africa The main issues resulting in the degradation of groundwater internationally (Section 2.2.2) also apply in South Africa, of which the main contributors are (Water Research Commission, 2004): • Settlements and services, e.g. wastewater treatment works and cemeteries. • Industrial contamination, e.g. metal painting industry, wood treatment plants and refineries. 10 • Petroleum contamination. • Mining contamination, e.g. tailings dams. • Waste disposal sites. • Agricultural contamination, e.g. pesticides and animal husbandry. 11 3 Fuzzy Logic versus Classical Logic 3.1 Introduction “Vagueness is no more to be done away with in the world of logic than friction in mechanics…” Charles Peirce (Matlab, 2002). This chapter introduces the reader to fuzzy logic, the history thereof and how fuzzy logic generalises crisp logic. 3.2 Classical (Crisp) Logic 3.2.1 What is Classical Logic? One definition of logic is given as “the science that investigates the principles that govern correct or reliable inference” Siler and Buckley (2005). The basic element of logic is a proposition, a statement in which something is affirmed or denied, so that it can therefore be characterised as either true or false. A simple proposition might be: “Drawdown is dependent on abstraction” A more complex proposition would be: “Drawdown is dependent on abstraction AND the abstraction is 10l/s” In crisp logic, propositions are either true or false, with nothing in-between. It is often conventional to assign numerical values to the truth of propositions, with 1 representing true and 0 representing false. Important principles of classical logic are the following laws (Siler and Buckley, 2005): • The law of Excluded Middle states that a proposition must be either true or false: P AND NOT P = false = 0 • The law of Non-Contradiction states that a proposition cannot be both true and false at the same time: P OR NOT P = true = 1 12 Firstly we define the possibility as the extent to which available data fail to contradict a proposition. Possibility measures the extent to which a proposition might be true. In the absence of any data to the contrary, the possibility of a proposition is one. Secondly we define necessity to be the extent to which the available data support a proposition. Necessity measures the extent to which a proposition must be true. In the absence of any supporting data the necessity of a proposition is zero. Since this thesis is concerned with the development of a decision support tool to return answers to real world problems, it will be concerned primarily with the necessity to reach conclusions that are supported by data, not conclusions that might possibly be true. 3.2.2 Crisp Sets Consider the contents of Box 1 and Box 2 two displayed in Figure 1 and consider the following statements: Box 1 is a box of apples Box 1 is a box of pears Box 2 is a box of apples Box 2 is a box of pears Each statement can be either true or false. Crisp sets handle only two values with 0 representing false and 1 representing true (McNeill and Thro, 1994). Figure 1: Crisp Sets (no pun intended) 3.2.3 Boolean Operators Logic deals with true and false. A proposition can be true on one occasion and false on another. “Apple is a red fruit” is such a proposition. If you are holding a Granny Smith apple 13 that is green, the proposition that apple is a red fruit is false. On the other hand, if your apple is of a red delicious variety, it is a red fruit and the proposition in reference is true. If a proposition is true, it has a truth value of 1; if it is false, its truth value is 0. These are the only possible truth values. Propositions can be combined to generate other propositions, by means of logical operations. In two valued logic, truth values must be either 0 (false) or 1 (true). The truth value of proposition P and Q will be written tv(P) and tv(Q) respectively. The truth value of complex propositions is obtained by combining the truth values of the elemental propositions which enter into the complex proposition. The most common operators are NOT, AND, OR and NOT. The truth table for these three operators are shown in Table 1. Table 1: Truth table for classical logic tv(P) tv(Q) tv(P AND Q) tv(P OR Q) tv(NOT P) 0 0 0 0 1 0 1 0 1 1 1 0 0 1 0 1 1 1 1 0 The truth table for classical logic presented in Table 1 can be graphically displayed as shown in Figure 2. Figure 2: Graphic representation of AND, OR and NOT operators (Source Matlab, 2002) Throughout this chapter the following relation holds true: tv(NOT P) =1− tv(P) (1) There are many formulas that can be written to compute algebraically the truth of P AND Q and P OR Q from the truth values for P and Q, all of which will yield the same answers as 14 listed in Table 1 for classical truth values of 0 or 1. In fuzzy logic, these formulas may give different answers (Siler and Buckley, 2005). Listed here are only three of these formulas for P AND Q, all equivalent for classical logic, but not for fuzzy logic (Siler and Buckley, 2005): Zadeh operator: tv(P AND Q) = min(tv(P),tv(Q)) (2) Bounded difference operator: tv(P AND Q) = max(0,tv(P) + tv(Q) −1) (3) Probabilistic operator, assuming independence: tv(P AND Q) = tv(P)* tv(Q) (4) Just as there are many formulas for computing P AND Q, there are also many ways of computing P OR Q, which will all give the same result as in Table 1 for classical logic, but that are not equivalent for fuzzy logic. Listed here are the counterparts for the OR operator of the above equations (Siler and Buckley, 2005): Zadeh operator: tv(P OR Q) = max(tv(P),tv(Q)) (5) Bounded sum operator: tv(P OR Q) = min(1,tv(P) + tv(Q)) (6) Probabilistic operator, assuming independence: tv(P OR Q) = tv(P) + tv(Q) − tv(P)*tv(Q) (7) Each formula for tv(P AND Q) has a corresponding formula for tv(P OR Q), called a dual operator. Considering the listed equations, (2) and (5) are a dual pair, as are (3) and (6), and also (4) and (7). If the NOT and AND operators are chosen as primitives or basic operators, the OR operator can be derived. If the NOT and OR operators are taken as primitives the AND operator can be derived from De Morgan’s theorems (Peyton and Peebles, 1993), given in (8) and (9): 15 tv(P AND Q) = tv(NOT (NOT P OR NOT Q)) (8) tv(P OR Q) = tv (NOT (NOT P AND NOT Q)) (9) 3.3 Fuzzy Logic 3.3.1 History of Fuzzy Logic Since the emergence of the formal concept of numerical probability theory in the mid- seventeenth century, uncertainty has been perceived solely in terms of probability theory. This seemingly unique connection between uncertainty and probability is now challenged with several mathematical theories, distinct from probability theory, which are shown to be capable of characterising situations under uncertainty. One of the well-known theories that began to emerge in the 1960’s, are the theory of fuzzy sets (Ozbek and Pinder, 2005). The “fuzzy methodology” has gone under the name fuzzy logic for approximately 40 years, but its roots go back 2500 years. Even Aristotle considered that there were degrees of true and false, particularly in statements about possible future events. Aristotle’s teacher, Plato, considered degrees of membership (McNeil and Thro, 1994). In the eighteenth century, George Berkeley and Scot David Hume thought that each concept has a concrete core, to which concepts that resemble it in some way are attracted. Hume in particular believed in the logic of common sense which can be reasoning based on the knowledge that ordinary people acquire (McNeil and Thro, 1994). In Germany, Immanuel Kant considered that only mathematics could provide clean definitions, and many contradictory principles could not be resolved. For instance, matter could be divided infinitely, but at the same time could not be infinitely divided (McNeil and Thro, 1994). The American school of philosophy called pragmatism was founded by Charles Sanders Peirce in the early years of this century, who stated that the meaning of an idea is found in its consequences. Peirce was the first to consider “vagueness’, as a hallmark of how the world and people function (McNeil and Thro, 1994). 16 The idea that “crisp” logic produced unmanageable contradictions was popularised in the beginning of the twentieth century by the English philosopher and mathematician, Bertrand Russell. He also studied the vagueness of language, as well as its precision, concluding that vagueness is a matter of degree (McNeil and Thro, 1994). The German philosopher Ludwig Wittgenstein studied the ways in which a word can be used for several things that really have little in common, such as a game, which can be competitive or non-competitive (McNeil and Thro, 1994). The original (0 or 1) set theory was invented by the nineteenth century German mathematician Georg Kantor. But this “crisp” set has the same shortcomings as the logic it is based on. The first logic of vagueness was developed in 1920 by the Polish philosopher Jan Lukasiewicz. He devised sets with possible membership values of 0, 1/2, and 1, later extending it by allowing an infinite number of values between 0 and 1 (McNeil and Thro, 1994). The next big step forward came in 1937, at Cornell University, where Max Black considered the extent to which objects were members of a set, such as a chair-like object in the set Chair. He measured membership in degrees of usage and advocated a general theory of “vagueness” (McNeil and Thro, 1994). The work of these nineteenth and twentieth century thinkers provided the background for the founder of fuzzy logic, an American named Lotfi Zadeh. In the 1960’s, Lotfi Zadeh invented fuzzy logic, which combines the concepts of crisp logic and the Lukasiewicz sets by defining graded membership. One of Zadeh’s main insights was that mathematics can be used to link language and human intelligence. Many concepts are better defined by words than by mathematics. Fuzzy logic and its expression in fuzzy sets provide a discipline that can construct better models of reality (McNeil and Thro, 1994). 3.3.2 What is Fuzzy Logic? “In almost every case you can build the same product without fuzzy logic, but fuzzy is faster and cheaper . . .” Lotfi Zadeh (1965). Fuzzy logic is a superset of conventional or classic logic (Van der Werf and Zimmer, 1997) that has been extended to handle the concept of partial truth (truth values between completely true and completely false). 17 Fuzzy logic is discussed in detail in Matlab (2002). Fuzzy logic concerns the relative importance of precision. How important is it to be exactly correct when a rough answer will do? Fuzzy logic balances significance and precision (see Figure 3), something that humans have been managing for a very long time. Figure 3: Precision versus significance (Source Matlab, 2002) Fuzzy logic is a convenient way to map an input space to an output space, thereby capturing the knowledge of experts. For example: • A user states how good the service was at a restaurant, and fuzzy logic tells the user what the tip should be. • A user states how far away the subject of the photograph is, and fuzzy logic will focus the lens. • A user states how fast the car is going and how hard the motor is working, and fuzzy logic will shift the gears. A graphic example of an input-output map is shown in Figure 4. 18 Figure 4: Mapping of input and output (Source Matlab, 2002) Between the input and the output, there is a black box that maps the input to the correct output. In the black box there can be a number of systems for example fuzzy systems, linear systems, expert systems, neural networks, differential equations and interpolated multi- dimensional lookup tables. However, in this thesis the black box will contain fuzzy logic for the following reasons: • It is conceptually easy to understand. The mathematical concepts behind fuzzy reasoning are simple. • It is flexible. With any given system, it is easy to layer more functionality without starting from scratch. • It is tolerant of imprecise data. Fuzzy reasoning compensates for imprecise data sets in its processes. • It can model nonlinear functions of arbitrary complexity. • It can be build on the experience of experts. In direct contrast to neural networks, which take training data and generate opaque, impenetrable models, fuzzy logic relies on the experience of people who already understand the system. • Fuzzy systems do not necessarily replace conventional control methods. In many cases, fuzzy systems augment them and simplify their implementation. • Fuzzy logic is based on natural language. The basis for fuzzy logic is the basis for human communication. Even though fuzzy logic is favoured in this thesis, one must be aware of the fact that it is hard to develop a model from a fuzzy system. 19 3.3.3 Elementary Fuzzy Logic and Fuzzy Propositions Like classical logic, fuzzy logic is concerned with the truth of propositions. However, in the real world propositions are often only partly true. The truth value of a proposition is a measure in the interval [0,1] of how sure one is that the proposition is true. Not only propositions have truth values. Data have truth values associated with them, a measure of the extent to which the values of the data are valid. Rules have truth values associated with them, a measure of the extent to which the rule itself is valid. In general, the truth value of “something” is a measure in [0, 1] of the validity of “something” (Siler and Buckley, 2005). As in classical logic, a fuzzy proposition is a statement whose truth can be tested. Most such statements are comparisons between observed and specified data values. Unlike classical logic, a fuzzy proposition may be partly true. There are two reasons why a fuzzy proposition may be only partly true. Firstly, the data being tested may be only partly true, that is, may have truth values less than 1. Secondly, the comparison itself may be only partly true, so that the truth value of a comparison may be less than 1. The structure of fuzzy propositions may be considerably more complex than the structure of crisp (non-fuzzy) propositions. In crisp propositions, data are seldom multi-valued and their truth values (if the data exist) are always 1. Crisp comparisons are all Boolean, returning either 0 or 1. In fuzzy propositions, single-valued data are accompanied by truth values. Data in a fuzzy system may also be multi-valued. Fuzzy sets and truth values may also be multi-valued, on fuzzy numbers. Comparisons among data commonly return truth values other than 0 or 1 (Siler and Buckley, 2005). 3.3.4 Fuzzy Sets Consider the contents of box 3 shown in Figure 5 and comment on the statement: Box 3 is a box of apples. A simple true or false is no longer suitable, and an answer of mostly would be a better answer. Sometimes it is not important to know exactly how many apples are in the box, but only that the box contain mostly apples (McNeill and Thro, 1994). This relates to the concepts of precision and significance as discussed in Section 3.3.2. Fuzzy sets handle all values between 0 and 1, where 0 represents false and 1 represents true. 20 Figure 5: Fuzzy set (McNeill and Thro, 1994) Taken from Siler and Buckley (2005): Let X be a collection of objects called a universal set. The sets will all be subsets of X. To explain the transition from regular sets (crisp) to fuzzy sets, assume all subsets of X to be crisp subsets. Let A be a subset of X. For each x in X, it is known whether x belongs or does not belong to A. Define a function on X whose values are zero or one as follows: • the value of the function at x is one if x is a member of A • the value is zero if x does not belong to A This function is written as A(x) = 1 if x is in A or A(x) = 0. This function is called the characteristic function on A and any such function, whose values are either zero or one, defines a crisp subset of X. Fuzzy sets generalise the characteristic function in allowing all values between 0 and 1. A fuzzy subset μ of X is defined by its membership function (a generalisation of the characteristic function), also written μ (x), whose values can be any number in the interval [0,1]. The value of μ(x) is called the degree of membership of x in fuzzy set μ. These functions will be discussed in more detail in Section 4.3.2. Fuzzy sets were introduced with a view to reconcile mathematical modelling and human knowledge in the engineering sciences. Contrary to the main trends in Artificial Intelligence, the fuzzy set methodology maintained close links with numerical modelling, acknowledging that cognitive categories that humans use to describe the world are not binary notions (Ozbek and Pinder, 2005). 21 There are two very special fuzzy sets needed in fuzzy expert systems: • Discrete fuzzy sets • Fuzzy numbers The next two sections will introduce these special fuzzy sets. 3.3.4.1 Discrete Fuzzy Sets Assume that X is finite, the simplest discrete fuzzy set D is just a fuzzy subset of X, which can be written as ⎧ ⎫ D μ μ= ⎨ 1 , 2 ,..., μn ⎬ (10) ⎩ x1 x2 xn ⎭ where the membership value of x1 in D is µ1. Discrete fuzzy sets for fuzzy expert systems may be numeric or non-numeric, depending on whether their members describe numeric or non-numeric quantities. Members of a numeric discrete fuzzy set always describe a numeric quantity. Such discrete fuzzy sets are called linguistic variables (Siler and Buckley, 2005). 3.3.4.2 Fuzzy Numbers Fuzzy numbers represent a number whose value is somewhat uncertain. They are a special kind of fuzzy set whose members are numbers from the real line and hence are infinite in extent (Siler and Buckley, 2005). The function relating a member number to its degree of membership is called a membership function and is best visualised by a graph, as displayed Figure 6. 22 Figure 6: Membership function for a triangular fuzzy and crisp "5" Membership functions can assume any shape, as long as the degree of membership lies within the set [0, 1]. A crisp number is a single valued number, which has a degree of membership of 1 at the specific number and exists nowhere else. A fuzzy number, on the other hand, is multi-valued with different degrees of membership for the different values it represents. As an example the fuzzy number 5, as shown in Figure 6, has a value of 4 with a degree of membership of 0.8. Note that the shape of the membership function defines the fuzzy number. 3.3.5 Algebra of Fuzzy Sets A summary of the algebra of fuzzy sets is provided in this section. In fuzzy logic the generalised AND and OR operators from classical logic are used. They are called t-norms (for AND) and t-conorms (for OR) (Fuzzy Logic Fundamentals, 2007). 3.3.5.1 t-Norms A t-norm T is a function from [0, 1] * [0, 1] into [0, 1]. That is, if z = T(x, y), then x, y, and z all belong to the interval [0, 1]. All t-norms have the following four properties: • T(x, 1) = x (boundary) • T(x, y) = T(y, x) (commutativity) 23 • if y1 ≤ y2 then T(x, y1) ≤ T(x, y2) (monotonicity) • T(x, T(y,z)) =T(T(x,y), z) (associativity) T-norms generalise the AND from classical logic. This means that tv(P AND Q) = T(tv(P), tv(Q)) for any t-norm and equations (10) – (12) are all examples of t-norms. The basic t-norms are (Fuzzy Logic Fundamentals, 2007): Zadehian intersection: Tm (x,y ) = min(x,y ) (11) Bounded difference intersection: TL (x,y ) = max(0, x + y −1) (12) Algebraic product: Tp (x,y) = xy (13) Extending the t-norms to n variables through the use of the associativity property yields the following results: Tm (x1,..., xn ) = min(x1,..., xn ) (14) T nL (x1,..., xn ) = max(0,∑ xi −n +1) (15) i=1 Tp (x1,..., xn ) = x1...xn (16) 3.3.5.2 t-Conorms t-Conorms generalise the OR operation from classical logic. As for t-norms, a t-conorm C(x,y) = z has x, y, and z always in [0, 1]. The basic properties of any t-conorm C are: • C(x, 0) = x (boundary) • C(x, y) = C(y, x) (commutativity) • If y1 ≤ y2 then C(x, y1) ≤ C(x, y2) (monotonicity) • C(x, C(y, z)) = C(C(x, y), z) (associativity) The basic t-conorms are (Fuzzy Logic Fundamentals, 2007): Standard union: 24 Cm (x, y ) = max(x, y ) (17) Bounded sum: CL (x,y ) = min(1, x + y ) (18) Algebraic sum: Cp (x,y ) = x + y − xy (19) Extending the t-conorms to n variables through the use of the associativity property yields the following results: Cm (x1,..., xn ) = max(x1,..., xn ) (20) CL (x1,..., xn ) = min(1,∑n xi ) (21) i=1 Cp (x1, x2, , x3 ) = (x1 + x2 + x3 )− (x1x2 + x1x3 + x2x3 )+ (x1x2x3 ) (22) 3.3.6 Comparing Fuzzy Numbers Comparing fuzzy numbers includes comparing data with multiple values and truth values. The members of a fuzzy number are numbers from the real line. This comparison may be carried out using the extension principle (Siler and Buckley, 2005): tv(A ~= B) = max(min(A(x),B(x)) (23) over all x. 3.3.7 Fuzzification and Defuzzification Concepts like favourable and unfavourable are not represented by discrete values, but by fuzzy sets, enabling values to be assigned to sets to a matter of degree, a process called fuzzification. Using fuzzified values computers are able to interpret linguistic rules and produce an output that may remain fuzzy or more commonly, can be defuzzified to provide a crisp value. This is known as a fuzzy inference system and is one of the most popular uses of fuzzy logic (Figure 7). 25 Figure 7: Fuzzy inference system (Fuzzy Logic Fundamentals, 2007) The concept of fuzzification and defuzzification is illustrated through the use of a hypothetical example in the following sections. 3.3.7.1 Fuzzification The verb “to fuzzify” has two meanings: 1. to find the fuzzy version of a crisp concept. 2. to find degrees of membership of linguistic values of a linguistic variable corresponding to an input number, scalar or fuzzy set. Usually, the term fuzzification is used in the second sense, and it is that sense that will be explored in this section. Suppose there is a fuzzy number Sfractured whose truth values are defined from 0.0001 to 0.001. To fuzzify Sfractured means to find degrees of membership of linguistic values in a linguistic variable (say aquifer storativity), which are the linguistic equivalent of the number Sfractured, over the interval S[0.0001, 0.1]. The name of the fuzzy set could be Storativity with members [favourable, unfavourable], all defined by membership functions in [0.00001, 0.1]. 26 The fuzzification operation is quite simple. The degree of membership of each linguistic value is the truth value of the fuzzy propositions and can be written as follows: μ(favourable) = tv(Sfractured ~= favourable) μ(unfavourable) = tv(Sfractured ~= unfavourable) For which μ(favourable) is the degree of membership of favourable in the linguistic variable Storativity and the operator symbol ~= indicates an approximate comparison between the operands defined in Equation 22. Figure 8 illustrates fuzzification by showing the membership functions for Storativity together with a fuzzy number for Sfractured to be fuzzified into Storativity. Figure 8: Membership functions of linguistic variable Storativity, with an input fuzzy number Sfractured to be fuzzified The input fuzzy number Sfractured crosses the membership function of favourable at membership values of 0.56 and 0.65 of which 0.65 is the maximum. It crosses membership of unfavourable at 0.29 and 0.43 of which 0.43 is the maximum. The fuzzification process is now complete, and Storativity is now this fuzzy set: Storativity = ⎧ 0.65 , 0.43 ⎫⎨ ⎩favourable unfavourable ⎬ ⎭ 27 3.3.7.2 Defuzzification A fuzzy inference system maps an input vector to a crisp output value. In order to obtain a crisp output, we need a defuzzification process. The input to the defuzzification process is a fuzzy set (the aggregated output fuzzy set), and the output of the defuzzification process is a single number. First, it must be determined how to modify the membership functions for the linguistic values to reflect the fact that each value probably has a different degree of membership, some of which may be 0 and some of which may not be 1, but somewhere in-between. Assume a general linguistic value called “value”, and the linguistic variable of which value is a member “Lvariable”. The membership of a real number x in “value” can now be called μ(x, value) and the membership of value in lvar can be called μ(value, Lvariable). The membership function value is modified to reflect the fact that the membership of value in Lvariable is not necessarily 1. Assume the modified membership function is called μ‘(x, value). Modify the μ(x, value) by “AND”ing the membership function μ(x, value) with μ(value, lvar), which yields: μ' (x,value) = μ(x,value) AND μ(value, lvar ) (24) The most common choices for the AND operator in Equation 23 are the Zadehian intersection (Equation 10), often known as the Mamdani method because of its early successful use in process control by Mamdani and Gaines (1981). The membership functions of Figure 8 that were modified to reflect the memberships of their respective linguistic values are shown in Figure 9. 28 Figure 9: Membership functions of linguistic values in linguistic variable Storativity using the AND operator Next, the individual membership functions in Figure 9 must be aggregated into a single membership function for the entire linguistic variable. Aggregation operators resemble t-conorms, but with fewer restrictions (Klir and Yuan, 1995). The standard union (Equation 16) operator is frequently used. Figure 10 shows the aggregated membership functions of Figure 9. 29 Figure 10: Aggregated membership functions of linguistic values in linguistic variable Storativity using the OR operator In the last step, a single number must be obtained, compatible with the aggregated membership function of linguistic values. This number will be the output from this final step in the defuzzification process. Many defuzzification techniques have been proposed in the literature (Fuzzy Logic Fundamentals, 2007). The remainder of this chapter will discuss three of these defuzzification techniques (Siler and Buckley, 2005). In the following, let x represent the numbers from the real line, let μ(x) be the corresponding degree of membership in the aggregated membership function, let xmin be the minimum x value at the maximum and xmax be the maximum x value at the maximum and let X be the defuzzified value of x. Average Maximum: X (Average Maximum ) = (x max1+ ... + x max n ) / n (25) − 30 This method calculates the average of the values with the highest confidence. The method biases towards one end, since it ignores the lower confidence values. Weighted Average Maxima: X(Weighted Average Maxima) n (x max * μ(x max ))= ∑ i i (26) − i=1 ∑μ(x max i ) This method weighs a representative value from each set and calculates the average. Centroid (center of gravity): b ∫ xμ(x)dx X(Centroid ) = ab (27) − ∫ μ(x)dx a The method of centroid defuzzification is depicted in Figure 11. Figure 11: Centroid defuzzification (Fuzzy Logic Fundamentals, 2007) The centroid method is preferred by most fuzzy control engineers (Siler and Buckley, 2005). In these integrals, it is assumed that the support of the aggregated membership function is the interval [a,b]. The centroid method works by finding the centre of mass for the output sets. This method is complicated and “expensive” to calculate. The weighted average maxima method come close to the centroid and is much faster to calculate. For the purpose of the SAGDT the small inaccuracy is negligible and based on this the preferred defuzzification method applied in the SAGDT is the weighted average maxima. 31 4 Risk Analysis and Decision Making 4.1 Introduction "We can predict how current trends will affect us in the future. If we do not like the future that is projected, we can choose to change those trends..." Peter Glieck (2003). During the last few years, with the implementation of the National Water Act (1998), the thinking around groundwater management has changed dramatically. These changes are discussed in detail in Botha (2005). One of the main aims of the SAGDT is to provide a tool for the management of South African groundwater resources. This tool can be used to predict the behaviour of groundwater resources when subjected to stresses (abstraction, pollution etc). Various risk-based scenarios can be run to determine the trends of the resource under various conditions. 4.2 Risk Analysis 4.2.1 Introduction Management and risk have existed since the formation of mankind. First, the management was empirical. It was performed accounting for risk on the basis of intuition, experience and common sense. At later stages a form of government appeared. Then management was based on rules and directives of religion. Later, for more efficient management the elements of the mathematical management theory and the mathematical optimisation theory were used in the practical resolving of problems (Solojentsev, 2005). 4.2.2 Defining Risk The word “risk” is derived from the Italian word risicare, which means “to dare”. In this sense, risk is a choice rather than a fate (Bernstein, 1996). All actions involve risk, from crossing the street to building a dam. The term is usually reserved for situations where the range of possible outcomes to a given action is in some way significant. A risk can be broadly defined as the probability that an adverse event will occur in specified circumstances. Effective decision making involves the management of 32 risks, which are the identification, evaluation, selection and implementation of actions to reduce risk (Schwab and Genthe, 1998). 4.2.3 Analysing and Quantifying Risks Risk analysis is a technique that provides information to a manager, to facilitate complex and integrated decisions (Dennis et al., 2002). In a broad sense, risk analysis is any method - qualitative and/or quantitative - for assessing the impacts of risk on decision situations. Numerous techniques are used that blend both qualitative and quantitative techniques. The goal of any of these methods is to help the decision maker choose a course of action, given a better understanding of the possible outcomes that could occur. The risk analysis process usually encompasses three steps (Palisade Corporation, 2004): • Problem Formulation - by defining the problem or situation. • Analysing the Situation with Simulation - to determine the range and probabilities of all possible outcomes for the problem or situation • Making a Decision - based on the results provided Benefits of risk analyses include (Dennis et al., 2002): • A clear articulation of the risk. This includes the evaluation of the hazard and the extent and degree of harm that may result. Such an articulation allows risks to be balanced against one another. • Reveal the uncertainties inherent in the assumption by forcing one to assess the strengths and weaknesses of each assumption in order to estimate the risk by means of the systematic process of a risk analysis. As such, a risk analysis provides a mechanism to allow transparent decisions to be made. • Inherently flexible. A risk analysis can be targeted to a wide variety of situations and circumstances, but can also be tailored to target a specific demographic group, geographic area, temporal period or situation. There is no single analytical method for combining information into an estimation of a risk, but numerous risk analysis methods that span the spectrum from purely qualitative to highly complex mathematical models (Schwab and Genthe, 1998). The availability of data, finances and the required outcome will drive the choice of method. 33 The limitations of scientific information mean that some aspects of the analysis might involve qualitative aspects such as the use of professional knowledge (Schwab and Genthe, 1998). Risk analysis can therefore be seen as a combination of science and judgment. 4.3 Fuzzy Logic Risk Analysis 4.3.1 Inadequacy of the “Utility Measure” of Risk By destroying the meteor in the film Armageddon, Bruce Willis saved the world. The probability of the meteor strike was so large and the consequences so great, that little else mattered except to try to prevent the strike. Combining the probability and impact of a risk in order to define its size is standard practice. But in most cases it is irrational and it certainly would not have explained to Bruce Willis and his crew why their mission made sense. This utility type measure of risk is quite useful for prioritising risks (the bigger the number the “greater” the risk) but it is normally meaningless. More importantly, one normally cannot obtain the numbers one needs to calculate it (Fenton and Martin, 2006). Consider the Armageddon example: • One cannot get the Probability number. According to the NASA scientists in the film the meteor was on a direct collision course. Does that make the probability of it striking earth equal to one? Clearly not, because if it was one, then there would have been no point in sending Bruce Willis and his crew up in the space shuttle. The probability of the meteor striking earth is conditional on a number of other control events (like intervening to destroy the meteor) and trigger events (like being on a collision course with earth). It makes no sense to assign a direct probability without considering the events it is conditional on. In general, it makes no sense (and would in any case be too difficult) for a risk manager to give the unconditional probability of every risk irrespective of relevant controls, triggers and mitigants. This is especially significant when there are, for example, controls that have never been used before (like destroying the meteor with a nuclear explosion). • One cannot get the Impact number. Just as it makes little sense to attempt to assign an (unconditional) probability to the event “Meteor strikes earth”, so it makes little sense to assign an (unconditional) number to the impact of the meteor striking. Apart from the obvious question “impact on what”, one cannot say what the impact is 34 without considering the possible mitigating events such as getting people underground and as far away as possible from the impact zone. • Probability risk score is meaningless. Even if one could get around the two above- mentioned problems, what exactly does the resulting number mean? Suppose the (conditional) probability of the strike is 0.95 and, on a scale of 1 to 10, the impact of the strike is 10 (even accounting for mitigants). The meteor “risk” is 9.5, which is a number close to the highest possible 10. But it does not measure anything in a meaningful sense (Roberts, 1979). • It does not tell what one really needs to know. What one really needs to know is the probability, given the current state of knowledge that there will be massive loss of life. 4.3.2 Fuzzy Logic Risk Theory Risk analysis using artificial intelligence techniques can reduce costs and present rapid decisions. When knowledge is complex and full of uncertainties or little is known about the inter-variable relationships, fuzzy expert systems can be useful in gathering scattered information and provide certainty about a fact. Frequently the knowledge of professionals as well as field observations, are the main sources of information to establish a knowledge base capable of evaluating critical situations (Veiga and Meech, 1994). According to Zadeh (1992), the strength of human reasoning lies in the ability to grasp inexact concepts directly rather than formulating exact ones. This forms the basis of the fuzzy logic risk theory presented here. Degree of membership is expressed as a value between 0 and 1. Zero implies 0% membership and 1 implies 100% membership. Typical examples of membership functions are shown in Figure 12. Figure 12: Examples of membership functions 35 Note that in most cases the membership functions of the two sets defining favourable and unfavourable will be inversed, although this is not a requirement (Van der Werf and Zimmer, 1997). Discrete membership functions are also accommodated for inputs provided from selection lists. Experts in the particular field define the membership functions. Linear membership functions are seldom used in practice in contradiction to sinusoidal functions, which are very popular. In most cases, risk analysis will involve more than one input to be considered in the analysis. Fuzzy logic makes it possible to generate a set of decision rules as a function of the number of inputs. The number of rules generated is given by the following equation (Van der Werf and Zimmer, 1997): n = 2m (28) where m = number of inputs n = number of rules The rules consist of all possible binary combinations of the respective inputs, with a weight assigned to each rule representing the risk. Table 2 shows the decision rules generated for three inputs. Instead of using true and false, the terms favourable and unfavourable are introduced in the rules to relate them to natural language. Table 2: Decision rules for three inputs Rule No Weight Input 1 Input 2 Input 3 1 0.0 Favourable Favourable Favourable 2 ? Favourable Favourable Unfavourable 3 ? Favourable Unfavourable Favourable 4 ? Favourable Unfavourable Unfavourable 5 ? Unfavourable Favourable Favourable 6 ? Unfavourable Favourable Unfavourable 7 ? Unfavourable Unfavourable Favourable 8 1.0 Unfavourable Unfavourable Unfavourable Rule number 1 is read as follows: If input 1 is favourable AND input 2 is favourable AND input 3 is favourable then the risk is 0%. 36 All the other rules are read in the same fashion and an expert must evaluate each individually to assign the appropriate risk. Note that no exact values are provided for the inputs and the expert rates the rules according to his experience and his perception of what is favourable and unfavourable. In actual fact, the expert is expressing the risk given his current state of knowledge. For each input, two membership functions must be defined with a favourable and unfavourable limit defining the two sets. One function will represent the favourable set and the other the unfavourable set. Thus, for each input, a favourable and an unfavourable value can be read from the membership functions. Applying the actual inputs to the associated member functions, Table 2 of decision rules is then populated with the respective favourable and unfavourable degree of membership values obtained. The fuzzification process is illustrated in Figure 13. The risk model assumes crisp values for each of the inputs. fuzzifcation takes place with crisp numbers in this case. Figure 13: Fuzzification of risk model inputs Once the fuzzy rule set is populated, it must be analysed to obtain the risk. To obtain the calculated risk, defuzzification is required. The process of defuzzification produces crisp numbers representing the risk which corresponds to the degrees of membership and the 37 weighted average maxima. Note that the calculated risk is not probabilistic based as discussed in Section 4.3.1. The weighted average maxima method (Section 3.3.7.2) is used to calculate the risk and is described by the following set of equations: μ(wi ) = min(μ(xi1),...,μ(xim )) (29) n ∑wi * μ(wi ) %Risk = i=1 n * 100 (30) ∑μ(wi ) i=1 where m = number of inputs n = number of rules μ(xij) = degree of membership for rule i input j μ(wi) = minimum degree of membership for rule i wi = weight of rule i 4.3.3 Model Validation and Uncertainty The term model uncertainty is used to represent lack of confidence that the mathematical model is a "correct" formulation of the assessment problem. Model uncertainty exists if there is a possibility of obtaining an incorrect result even if exact values are available for all of the model parameters. The best method for assessing model uncertainties is through model validation (Bear et al., 1992). This is a process in which the model predictions are compared with numerous independent data sets obtained under conditions similar to those for which the risk analysis is to be performed. Model validation is often limited because of lack of data, limited experimental opportunities and inadequate financial resources. In many instances, the endpoint of the assessment cannot be validated through direct measurement. To minimise the model uncertainty of the SAGDT, it is important to have multiple experts evaluate the fuzzy rule set. Experts may differ in their opinions regarding certain scenarios and/or conditions that the rule set describes, hence an averaging scheme was 38 recommended by the panel of experts involved in the project to obtain a representative fuzzy rule set. There are always events that might happen that cannot be anticipated. Experts will rate the fuzzy rule set according to their frame of reference and might not account for the effect of an extraordinary event. For example, who would have given any thought to the possibility of two large jets being hijacked and crashed into the Twin Towers simultaneously? Experts will rate the fuzzy rule set according to their frame of reference 4.3.4 Sensitivity Analysis Sensitivity analysis is the study of how the variation in the output of a model (numerical or otherwise) can be apportioned, qualitatively or quantitatively, to different sources of variation (Mandle, 2002). 4.3.4.1 Overview A mathematical model is defined by a series of equations, input factors, parameters and variables aimed to characterise the process being investigated. Input is subject to many sources of uncertainty including errors of measurement, absence of information and poor or partial understanding of the driving forces and mechanisms. This uncertainty imposes a limit on ones confidence in the response or output of the model. Models may have to cope with the natural intrinsic variability of the system, such as the occurrence of stochastic events. Good modelling practice requires that the modeller provides an evaluation of the confidence in the model, possibly assessing the uncertainties associated with the modelling process and with the outcome of the model itself (Bear et al., 1992). Sensitivity analysis offer a valid tool for characterising the uncertainty associated with a model. 4.3.4.2 Methodology There are several possible procedures to sensitivity analysis (ASTM, 2002). The most common sensitivity analysis is sampling-based. A sampling-based sensitivity is one in which the model is executed repeatedly for combinations of values sampled from the distribution (assumed known) of the input factors. Other methods are based on the decomposition of the variance of the model output and are model independent. 39 The methodology applied in the SAGDT is the sampling-based analysis. The distribution of the input factors are calculated from user supplied data confidence and fuzzy logic membership function associated with the particular input. The range for variation is specified through the favourable and unfavourable ranges for each input. 4.3.4.3 Advantages and Disadvantages The user may want to identify key drivers as well as other quantities for which they need to acquire better knowledge in order to make an informed decision. On the other hand, some quantities have no influence on the predictions, so that resources can be saved at no loss in accuracy by relaxing some of the conditions. Sensitivity analysis can aid in a variety of circumstances: • Identify critical assumptions • Guide future data collections • Detect important criteria • Optimise resource allocation • Model simplification or model lumping, etc. However there are also some problems associated with sensitivity analysis: • Variables are often interdependent, which makes examining them each individually unrealistic; for example: changing one variable such as porosity will affect another variable e.g. storativity. • Often the assumptions upon which the analysis is based are made by using past experience/data which may not hold in the future. • Assigning an optimistic and pessimistic value is open to subjective interpretation. For instance, one person’s “optimistic” forecast may be more conservative than that of another person performing a different part of the analysis. This point has been addressed in Section 4.3.3 by combining various experts’ opinions and using the favourable and unfavourable limits specified by the degree of membership functions for each input. 40 4.4 Decision Making A decision can be defined as a determination of future action. While considering this definition and considering the risk analysis methodologies discussed in this thesis, the following questions arise: • How are decisions made in the face of risk and uncertainty? • How should such decisions be made? • What is the proper role of risk analysis and in decision making? The focus of this section will be to demonstrate how risk analysis can be used in decision making. 4.4.1 Steps involved in decision making There are seven steps involved in decision making (University of Florida, 2007): • STEP 1: Identify the decision to be made. This includes going through a process of defining the nature of the decision that needs to be made. • STEP 2: Gather relevant information. Most decisions require collecting pertinent information. • STEP 3: Identify alternatives. Through the process of collecting information, one will probably identify two or more possible paths of action. • STEP 4: Weigh evidence. Draw on the information and evaluate whether the problem or need identified in Step 1 would be helped or solved through the use of each alternative. Eventually you are able to place the available alternatives in priority order. • STEP 5: Choose among alternatives. Once you have weighed all the evidence, you are ready to select the alternative that seems to be best suited to you. You may even choose a combination of alternatives. • STEP 6: Take action and implement the alternative chosen in Step 5. • STEP 7: Review decision and consequences. In this step one experiences the results of the decision and evaluates whether or not it has “solved” or helped to solve the problem in Step 1. If yes, one may stay with the decision. If no, one may repeat certain steps of the process in order to make a new decision. 41 4.4.2 Role of risk analysis in decision making Risk is a complex and controversial concept that typically has no direct implications for decision making. Assessing a risk as “high” does not necessarily mean that one should act to reduce it. Similarly, assessing a risk as “low” does not mean we should ignore it. Risk management decisions depend on the balancing of options, benefits, periods of risk and other associated costs, not just risk. The techniques of decision analysis have been developed to help managers and policy makers make complex decisions in the face of risk and uncertainty. A decision analysis approach to risk decision making has several advantages over the conventional practices of risk analysis (Schwab and Genthe, 1998). As outlined in Table 3, these advantages can be traced to the grounding of decision analysis methods in a specific framing for decision making. Thus, whereas risk is the central concept in risk analysis, with the problems noted above, the structure of the decision problem is central to decision analysis, along with the relevant probabilities and values. Table 3: Comparison of Risk and Decision Analysis Risk Analysis Decision Analysis Risk is the central concept Problem structure, probabilities, and values are central Subjectivity is respected and incorporated Subjectivity is respected and incorporated into the analysis into the analysis Models the multidimensional views and Models the multidimensional views and values of interested and affected parties values of interested and affected parties Seeks acceptable level of risk as a standard Acceptable risk is context dependent and to attain across problem domains decision driven When considering the steps in decision making discussed in Section 4.4.1, risk analysis can be applied (Steps 1–4), thereafter the decision-making process continues. It is important to note that decision making is the process of identifying, evaluating, selecting and implementing actions to reduce risks. The goal of decision making is scientifically sound, cost-effective, integrated actions that reduce risks while taking into account social, environmental, ethical, political and legal considerations. 42 4.4.3 The Role of the SAGDT in Decision Making The purpose of the SAGDT is to incorporate appropriate groundwater science and technology into a platform, to make informative decisions when considering groundwater options, and as a result open new horizons for better water use in South Africa. The development of the SAGDT and the detail on how the risk analysis occurs is documented in Chapter 5. 43 5 Development of the South African Groundwater Decision Tool 5.1 Introduction “Decisions are the endless uncertainties of life that we'll not know if they’re right until the very end, so do the best you can and hope it’s right…” Lily Collins (2007). Expert systems are computer programs, designed to make available some of the skills of an expert to non-experts. Since such programs attempt to emulate the thinking patterns of an expert, it is natural that the first work was done in Artificial Intelligence (AI) circles. Among the first expert systems were the 1965 Dendral programs, which determined molecular structure from mass spectrometer data; R1 used to configure computer systems; and MYCIN for medical diagnosis (Siler and Buckley, 2005). Since the mid-1960s, there have been many expert systems created for fields ranging from space shuttle operations through hospital intensive-care-unit patient monitoring to financial decision making (Siler and Buckley, 2005). Whatever type of expert system is employed, it is important to consider what the prerequisites are for constructing a successful system. The two primary sources of knowledge are the skills of an expert in the field and available historical data. Rule-based expert systems rely considerably on incorporating the skills of an expert in the problem domain, but relatively little on historical data. The SAGDT was designed as a rule-based system due to the little risk analysis historical data available in the field of geohydrology in South Africa. 5.2 Overview of the System This section of the document contains an overview of the SAGDT. 5.2.1 Introduction to the SAGDT As mentioned in Chapter 1, the SAGDT is designed to provide methods/tools to assist groundwater professionals and regulators in making informed decisions concerning 44 groundwater use, management and protection, while taking into account that groundwater forms part of an integrated water resource. The high level system architecture of the SAGDT is displayed in Figure 14. The individual components comprising the system are discussed in detail in the sections that follow. 3rd Party SA Groundwater Help Software Decision Tool System MapWindow GIS System Scenario Wizard TriPol Baysian Interpolator Spatial Assessment Unit Information Interface Object Converter (GISViewer) Database (CAD) DXF2xyz Converter Groundwater Dictionary Query Report Fuzzy Builder Generator Engine & XML Database Editor Figure 14: High Level System Architecture 5.2.2 SAGDT Graphical User Interface The SAGDT graphical user interface is shown in Figure 15 and consists of four main sections: • Main Menu and Toolbar • Main Status bar • Assessment Interface (CAD environment) • Spatial Information (GISViewer) 45 Main Menu Main Toolbar Toolbar Properties Legend Map Analysis Statusbar Figure 15: SAGDT Assessment Interface (CAD Environment) 5.2.2.1 Main Menu and Toolbar All the functionality available on the main menu is summarised in Table 4. The purpose of the main toolbar is to provide short cuts to some of the frequently used main menu functions. 46 Table 4: SAGDT Main Menu Functions Menu Icon Item Description Open Assessment Open a saved assessment Save Assessment Save the current assessment File Save As Save the current assessment to a new file name Exit Quit the SAGDT application Spatial Information Change view to the Spatial Information (GIS) View Assessment Interface Change view to the Assessment Interface (CAD) Make a point selection on the map in the Spatial Information for the Map Selection Assessment Interface Capture the current map view in the Spatial Information as a snapshot Capture Map for the Assessment Interface background Map Export Map Export the current map view to a file Map to Clipboard Copy the current map view to the clipboard Print Map Print the current map view Digitize Digitize elevation or water level data from topography maps Import Borehole Data Import borehole data from the provided CSV template Import elevation data from the provided CSV template. Imported data Import Elevation Data will not add to database, only replace database data for current scenario. Import water level data from the provided CSV template. Imported Import Water Level Data data will not add to database, only replace database data for current scenario. Import Tripol water level data f. Imported data will not add to Import Tripol Data database, only replace database data for current scenario. Export Borehole Data Export the current selected borehole data to a CSV file Export Elevation Data Export the current elevation data to a CSV file Data Export Water Level Data Export the current water level data to a CSV file Export Contour Files Export the available contour files to XYZ text files Export Tripol File Create a Tripol input file with the current borehole and elevation data Export Landscape Explorer Create an ASC grid file and BMP image file for Land Explorer Files Clear Elevation Data Clear all imported elevation data and use the default database values Clear all imported water level data and use the default database Clear Water Level Data values Excel Borehole Template Create the CSV template for boreholes data Excel Elevation Template Create the CSV template for elevation data Excel Water Level Template Create the CSV template for water level data 47 Table 4: SAGDT Main Menu Functions continued... Run the current analysis. A dialog will appear with more selections on Run Analysis Analysis which components to execute. View Report Generate a report for the current assessment Contour Set contour colours and specify inverse distance parameters Settings Environment Change coordinate display and set global settings of the GUI Convert Launch the convert utility to perform unit conversions DXF2xyz Launch the DXF to xyz converter Launch the Land Explorer utility for a 3D terrain view of the Land Explorer Utilities assessment Map Window Launch the Map Window utility for shape file editing and georeferecing TriPol Launch the Tripol utility for performing interpolation on a data set XML Marker Launch the XML Marker utility for editing XML file Contents Launch the SAGDT help file Groundwater Dictionary Launch the Groundwater Dictionary Help Scenario Wizard Run the scenario Wizard Bug Reporting Report a bug to the DWAF User Support About Display user licensing information 5.2.2.2 Main Status Bar The SAGDT status bar is shown in Figure 16. The purpose of the status bar is to provide feedback to the user with regard to hints, progress of an operation and the current status of the application. Hint Progress Indicator Status Figure 16: SAGDT Status bar 5.2.2.3 Assessment Interface A typical screen image of the assessment interface is shown in Figure 15. The interface comprises the following components: • Toolbar (at the top of the interface) 48 • Legend (situated on the left hand side of the interface) • Object Properties (situated on the right hand side of the interface) • Analysis Results (located just below the Object Properties) • Map (situated in the centre of the interface) • Status bar (situated at the bottom of the interface) 5.2.2.3.1 Toolbar A summary of the toolbar functionality for the assessment interface is given in Table 5. Table 5: Assessment Interface Toolbar Icon Item Description Change the map extent to the total extent of all the layers currently loaded so that all Zoom Extent the layers in the main map are visible. Zoom 100% Change the map extent to satisfy a zoom factor of 100%. Allows the user to specify the zoom extent by dragging a rectangle on the map to Zoom Mode specify the zoom extent. Zoom In 2x Change the map extent to show half the area than currently displayed. Zoom Out 2x Change the map extent to show 2 times the area than currently displayed. Allow the user to pan the map holding down the left mouse button on the map and Pan Mode moving the mouse. Allow the user to place measurement arrows on the map which will display the distance Measure Mode in meter. Rotate Mode Allows users to rotate selected objects. Add Point to Polygon Allows users to add additional points to area objects after they have been digitized. Delete Point from Allow users to delete points from area objects after they have been digitized. Polygon The Text Mode allows the user to place text any where in the CAD environment. This is Text Mode a handy tool to make notes for future reference, since it will be saved in the project file. Allows users to make a copy of a specific object. Not all objects allow copy and paste Copy functionality. Allows users to paste a copied object. Not all objects allow copy and paste Paste functionality. Allows users to delete selected objects. Not all objects support the delete function, Delete since some objects must be persistent throughout the assessment. Lock Lock the selected objects. Locked objects cannot be moved, resized or rotated. 49 Table 5: Assessment Interface Toolbar continued... Unlock Unlock an object to allow moving, resizing and rotating. The Object Inspector is only active for certain objects. This inspector allows the user to Object Inspector set the formatting of certain objects. For example colour, fill styles, fonts etc. Align Horizontal Align selected objects to the horizontal centre of the first selected object. Align Vertical Align selected objects to the vertical centre of the first selected object. Align Left Align selected objects to the left hand side of the first selected object. Align Right Align selected objects to the right hand side of the first selected object. Align Top Align selected objects to the top side of the first selected object. Align Bottom Align selected objects to the bottom side of the first selected object. Flip Horizontal Flip a selected object around its vertical centre. Flip Vertical Flip a selected object around its horizontal centre. Right click on the map will result in setting the clicked point position to zero. The Reference Tool coordinate display in the status bar will be set according to this reference. Click the Reference Tool again to switch off the referencing. 5.2.2.3.2 Legend The legend appears to the left of the interface and the tree structure describes how the different objects of an assessment relate to each other. An example of an assessment interface legend is shown in Figure 17. Figure 17: Assessment Interface Legend 50 The various nodes in the legend tree represent objects. The top object will always be the ancestor of all other objects and represents the area in which the assessment takes place. The legend has a few fixed objects that will always be created by the system, and are displayed in Table 6. Table 6: System Generated Legend Objects for Assessment Interface Icon Item Description Area Object Area object which acts as the parent for all nodes describing the scenario. Model Object Model object which represents the 2D finite difference flow and transport model. Contour Object Contours are created once a model run has taken place. Labels The Labels node act as the parent for all label and ruler objects placed on the area. Covers The Covers node act as the parent node for all covers added to the area. The and preceding an object indicates the object’s participation in the assessment. All objects that are not checked will not be taken into consideration when an assessment is performed. All other objects are created by the user through the use of the legend popup menu which is invoked through a right click operation on the legend. A summary of available objects through the popup menu is shown in Table 7. A detailed description of each object is presented in Section 5.4.7.4.3.1. Note that all objects with a icon indicates that model interaction takes place with the object and all objects with a icon indicates that it is a function object used to calculate a value(s). 51 Table 7: Assessment Interface Scenario Objects Sub Menu Icon Object Description Source Borehole Source / Sink Apply higher or lower transmissivity zones to Boundary the 2D finite difference model. Dam Fixed head for 2D finite difference model Boundary River Fixed head for 2D finite difference model Wetland Fixed head for 2D finite difference model Fixed head at sea level for 2D finite Sea difference model Logan Logan’s method to determine transmissivity Transmissivity Slug Slug test method to determine transmissivity Cooper-Jacob method to determine Cooper-Jacob transmissivity Chloride Chloride method to determine recharge Recharge Earth Method Earth method to determine recharge Pollution (Area) Area pollution source Pollution (Point) Point pollution source Opencast Mine pollution source. Calculates Mine (Opencast) sulphate generation rates and decanting Pollution parameters. Waste Site pollution source for determining Waste Site the waste site impact on the environment Sea water intrusion object that calculates the Sea Water Intrusion conditions for salt water intrusion from the sea. Protection of riparian zone along rivers and Ecological Ecological wetlands 52 Table 7: Assessment Interface Scenario Objects continued... Toxin (Ingestion) Toxin health objects for the various exposure Toxin (Inhalation) pathways Toxin (Submerge) Carcinogen (Ingestion) Carcinogen health objects for the various Carcinogen (Inhalation) exposure pathways Health Carcinogen (Submerge) Radioactive (Ingestion) Radioactive health objects for the various Radioactive (Inhalation) exposure pathways Radioactive (Submerge) Microbial (Single) Microbial health objects Microbial (Distributed) Herold Method Herold’s method for baseflow separation Reserve Reserve Reserve calculation for an area Groundwater availability for an area (similar Availability to Reserve) Quaternary baseflow scaled according to Scaled Baseflow assessment area assuming equal distribution of the baseflow Quaternary groundwater use scaled Scaled Scaled Groundwater Use according to assessment area assuming equal distribution of the groundwater use Quaternary population scaled according to Scaled Population assessment area assuming equal distribution of the population Plot drawdown or concentration of the Measure Probe selected cell over the specified number of time steps In addition to the objects available from the popup menu, additional functionality is also presented on the popup menu, as shown in Table 8. 53 Table 8: Tree Popup Functionality Icon Item Description Select All Select all objects Deselect All Deselect all objects Select All Select all the descendants of the selected object Descendants Deselect All Deselect all the descendants of the selected object Descendants Delete all selected objects. Note some objects like the model object will not be deleted Delete Selected even if selected Add Label Create a label for the selected object When a label was created for an object and the object was moved this function will move Move Label the label back to the vicinity of the selected object 5.2.2.3.3 Object Properties When an object is selected, the object properties are displayed to the right of the map. Each object has a set of properties associated with the object. An example of the area object’s properties is shown in Figure 18. Figure 18: Example of Area Object Properties 54 Note that some of the properties have an icon in front of the property together with a different colour text. The icon keys are given in Table 9 and are discussed in more detail in Section 5.4.7.4.3.2. Table 9: Property Legend Icon Description Locked property updated through calculation of lower levels Property acquired from a higher level in the assessment tree Property updated through calculation of lower levels Calculated property value from current object properties Locked property that cannot be altered by the user Property acquired from the model interface (e.g. drawdown) Value obtained from a curve method User input through a selection list User input required A popup menu with the selections displayed in Table 10 is invoked by a right click on the object properties. Table 10: Object Property Popup Menu Icon Menu Item Description Database Tool Launch the database interface Object Help Launch the help file for the current object Property Legend Display the property legend Copy Copy the highlighted value Paste Paste the copied value 5.2.2.3.4 Analysis Results The analysis results are presented just below the object properties. Each object has its own results and the results window will update the selection of an object. A typical example is shown in Figure 19. 55 Figure 19: Example of Analysis Results A popup menu is invoked by a right click on the analysis results giving the user the option to view the sensitivity analysis associated with the selected analysis result. An example of the sensitivity analysis is shown in Figure 20. Figure 20: Example of Sensitivity Analysis 56 5.2.2.3.5 Map The map presented in the centre of the assessment interface represents the CAD environment in which the scenarios are built. The objects on the map are manipulated through the functions presented on the toolbar shown in Section 5.2.2.3.1. 5.2.2.3.6 Status Bar The status bar is to give feedback to the user regarding the assessment interface. The status bar is shown in Figure 21. Current File Name Zoom Factor Contour Map Value Current Coordinate Figure 21: Assessment Interface Statusbar 5.2.3 GISViewer OCX Control The GIS functionality is provided by the DWAF GISViewer OCX (OLE (Object Linking and Embedding) Control Extension) control which was specifically updated with features required by the SAGDT. All updates to the GISViewer were done by the author. The GISViewer is an OCX wrapper around Map Objects Lite (MOLT) from ESRI (Environmental Systems Research Institute). The GISViewer presents all the MOLT functionality with additional functionality developed specifically for DWAF applications. The additional functionality includes: • A tree view legend • Chart renderer to display pie and bar charts • Coordinate conversion from Geodetic to Cartesian • Locked layer functionality and the querying thereof • Ruler functionality • Layout file format to save all settings of a user • Locality map • Spatial query builder • XML configuration file for meta data and rendering properties 57 • Custom user selection tools The GISViewer allows full view and GIS query functionality that can be used in any development environment that supports OCX controls. 5.2.3.1 Configuration Files Two types of configuration files are associated with the SAGDT. The first is an XML (eXtensible Markup Language) file utilised by the GISViewer and the second is a proprietary file format for saving layout information of the Spatial Information interface. 5.2.3.1.1 XML File The GISViewer utilises a XML format file at startup to provide a list of layers to be loaded automatically when the GISViewer is initialised. The XML file to be used at startup can be specified under the map properties of the control. The layers defined in the XML format file need to be available in the default covers directory specified under map properties. The XML configuration file manages the meta data associated with a shape file. This configuration file specifies which attributes should be visible as well as provide aliases for cryptic attributes names. For each layer it also specifies if the layer is locked, i.e. the layer cannot be deleted from the legend through the front end. All locked layers are loaded by default on startup. The GisViewer requires that the XML file have the name META_DATA.xml and resides in the XMLFile folder which must be a subfolder where the application resides. All layers specified in the XML file are assumed to reside in the Covers folder, which must also be a subfolder of the application path. Figure 22 show an example of the META_DATA.xml file. 58 Figure 22: XML File Format The format of the XML file can be described as follows: A LAYERS node exists under the root. Under the LAYERS node all shape files are represented with a SHP_FILE node. Under the SHP_FILE node, four attributes provides information about the layer: • LOCKED (True or False) • NAME (Name of the layer as it would appear in the legend) • FILE NAME (Name of the actual shape file) • TYPE (Always 0 for shape files) Under the SHAPE_FILE node a META_DATA node exists as a parent to FIELD nodes. Each FIELD node has three attributes: • NAME (Name of the database field) • ATTR (Attribute that will be displayed as alias of the field) • UNIT (Unit of the field if applicable) Any XML editor can be used to edit the file. The example above was created with XML Marker, a freeware XML editor available from http://XMLMarker.com, which is distributed with the SAGDT. 59 5.2.3.1.2 Propriety Layout File The GISViewer supports the saving of layout files. The Layout file has a .glf extension, for example “MyLayout.glf”. All layer properties, legend states and render settings required to rebuild the main map, locality map and legend are saved in the layout file when “Save Layout” is selected. When a Layout file is opened, all the current layers, layer properties and renderers are removed. The GISViewer then loads all the layers, layer properties and renderers that were saved in the layout file. The main map section, locality map and legend will be restored to the saved state represented by the layout file. Layout files can be distributed between different users on condition that all the layers in the layout file are available on the target computer. If the file paths to the layer files are different from these of the source computer, a prompt will appear. A choice is presented to browse to the location where the layer files reside, or to not load the layer. Once the layer has been loaded the new file paths will be updated in the layout file. 5.2.3.2 Graphical User Interface (GUI) The spatial information section is presented as a tabsheet with the DWAF GISViewer embedded in it, as shown in Figure 23. The layout of the spatial information can be divided into the following main sections: • Toolbar • GIS Tab • Data Tab • Status Bar 5.2.3.2.1 Toolbar A summary of the toolbar functionality in the spatial information is given in Table 11. 60 Table 11: Spatial Information Toolbar Icon Item Description Clicking the Load Layout button allows the user to browse for and select a previously Load Layout stored Layout File Clicking the Save Layout button allows the user to specify a file name and location for a Save Layout new Layout File Clicking the Remove Layers button will remove all the layers that are not set as locked Remove Layers layers in the XML file from the main map. Clicking the Add Layers button allows the user to browse for and select any valid layer Add Layers files to add to the Main Map. Clicking the Full Extent button will change the main map extent to the total extent of all Zoom Full Extent the layers currently loaded so that all the layers in the main map are visible. Clicking the Zoom to Layer will change the main map extent to the total extent of the Zoom to Layer currently selected layer in the legend. Clicking the Zoom Out 2x button will change the main map extent to show 2 times the Zoom Out 2x area than currently displayed. Clicking the Zoom In 2x button will change the main map extent to show half the area Zoom In 2x than currently displayed. Clicking the Previous Extent button will change the main map extent to the extent Previous Extent immediately before the extent was changed by using any of the zoom functionality. The user is allowed a maximum of ten previous extents. Clicking the Zoom Mode button will put the main map in zoom mode. The user can then select the new extent to be displayed by drawing a rectangle on the main map. The rectangle is drawn by moving the mouse curser over the main map to one of the Zoom Mode desired corners of the new extent. While holding down the left moue button and dragging the mouse, the zoom rectangle will be drawn on the main map. As soon as the mouse button is released, the main map extent will be changed to the boundaries of the rectangle. Clicking the Pan Mode button will put the main map in pan mode. The user can now Pan Mode move the main map extent by holding down the left mouse button and dragging. Clicking the Identify Mode button will put the main map in Identify Mode. The user can now click on a point in the main map to display the Identify dialogue. The Identify dialogue is displayed when the user clicks on a feature on the Main Map when the GISViewer is in Identify Mode. All the features on all the layers at the specified point are displayed in a multi-tab table. The name of the layers on which the feature appears is displayed as the tab name as they appear in the legend. For layers set up in the XML Identify Mode file, the name of the layer and tab will be the alias name specified in the XML file. The fields, field values and units are displayed as rows in the table. Layers set up in the XML file will only contain the fields specified with the units provided that units were specified in the XML file. Layer tabs for layers not specified in the XML file will contain all fields without any unit. 61 Table 11: Spatial Information Toolbar continued... Clicking the Measure Mode button will put the main map in measure mode. The user can now measure distances in meters by clicking the first point and clicking the second Measure Mode point. The distance of the current segment as well as the total distance is displayed in the statusbar. Clicking the Selection Tool button will put the main map in selection mode. The user needs to define a query in the Query Builder before the selection tool can be used. The Selecting Tool selection tool is used to define the geographical area for executing the defined spatial queries in the Query Builder. Clicking the Query Locked Layers button will put the main map in Query Locked Layers mode. The user selects a point on the main map by using the left mouse button. A flag Query Locked Layers is displayed at the selected point. The Query Results will be populated with all the features found for all the locked layers at the specified point. Clicking the Query Builder button launches the Query Builder. The Query Builder tool is used to define all spatial queries the user needs to execute. Query Builder 62 Table 11: Spatial Information Toolbar continued... The user must first select the layer to be queried. This is done by selecting the required layer in the drop down box under Map Layer. The next section of the Query Builder is used to build the required expression in the Expression Editor. The user can select a field for which to set query criteria in the drop down box under Layer Field. The query operator can be selected and the required value entered in the Value field. Clicking on the OK button will add the values in the correct query expression syntax in the Expression Editor. Clicking either the AND or OR button will add the selected values in the correct query expression syntax. This will allow the user to select another set of required values to be added to the query expression. The user can also directly type or edit the expression in the editor. Clicking on the Add New button will add the query to the list of defined queries. The list of defined queries displays the Selected Map Layer and the Query Expression for each query. The colour of the query line indicates the colour in which the results will be drawn on the main map. The default colour for the query is yellow, but can be changed by selecting the required query in the list and clicking on the Change Colour button. Note: If all values for any particular layer need to be returned by the query, the query expression required is blank. This is achieved by selecting the appropriate layer under Map Layer and clicking the Add New button with the Expression Editor left blank. The Selected Map Layer will appear as selected with a BLANK expression. The defined query expression can be changed after the query was added to the list of queries. Clicking the Edit button will enter the Query Expression in the Expression Editor allowing the user to change the expression. The changed expression will replace the original query expression when the user clicks on the replace button. The user can remove queries from the list by selecting the unwanted query and clicking the Remove button. Clicking the Remove All button will delete all the queries in the list. The Query Type drop down box contains all the possible types of queries that can be executed. The Query Type selection applies to all the queries defined in the query list. The available query types are given below: Extent Overlap Returns features whose extents overlap the extent of the search feature. Line Cross Returns features that intersect the search feature. 63 Table 11: Spatial Information Toolbar continued... Area Intersection If the search feature is a polygon feature, returns features that are wholly or partially contained within it, but not adjacent to it. Otherwise, the features themselves must be polygon features, and the method returns features that wholly or partially contain the search feature. This method is similar to the Contained By search method, with the difference that the feature may contain the shape, OR the shape contains the feature. Contained By Returns features that wholly contain the search feature. If the feature is a polygon feature, the search feature must be wholly inside it, inclusive of the feature’s boundary. If the feature is a line feature, the search feature must lie along the feature's path. If the feature is a point feature, the search feature must be on one of its vertexes. Completely Inside Returns features that are wholly contained within the search feature. The Query Shape drop down box contains all the possible spatial shapes to be queried. The selected query shape applies to all the queries defined in the query list. The possible Query Shapes and descriptions are given below: Query Rectangle: The user is allowed to specify a rectangular box on the Main Map as the Query Shape. The GISViewer will use the boundaries of the rectangle in the query. The Rectangle is drawn on the main map by holding down the mouse button and dragging the mouse cursor on the main map. The rectangle is completed when the user releases the mouse button. Query Line: The user is allowed to specify a line on the main map. The GISViewer will execute the query along the specified line. The line is drawn on the main map by clicking on the first point of the line. The next point is specified by moving the mouse cursor to the next point and clicking on the point. The last point is specified by a double click on the last point. Query Polygon: The user is allowed to specify a polygon on the main map. The GISViewer will use the boundaries of the specified polygon in the query. The polygon is drawn on the main map by selecting the first corner. The following corners are selected by moving the mouse cursor to and clicking on the next point. The last corner is specified by a double click. Query Circle: The user is allowed to specify a circle on the main map. The GISViewer will use the boundary of the specified circle in the query. The circle is drawn on the main map by moving the mouse cursor the centre of the required circle. Holding down the mouse button the user drags the mouse cursor in any direction until the required size circle is obtained. The circle is completed when the user releases the mouse button. 64 Table 11: Spatial Information Toolbar continued... Query Map Feature: The user is allowed to specify a map feature as query shape on the main map. The GISViewer will use the selected feature shape boundary in the query. The map feature is specified by selecting the Query Map Feature as Query Shape in the Query Builder. This will allow the user to specify the map layer on which the required feature appears. The user must also specify the Field and Value required to uniquely identify the required map feature. The user can store a set of defined queries. Clicking the Save Query button open a File Save As dialogue allowing the user to specify the required location and file name. A query file with the extension .gqf will be created. Clicking the Open Query button will allow the user to browse and select a previously stored query file. Query files can also be distributed between users. It is important to note that all the layers indicated in the Selected Map Layer list must be loaded in the main map and must appear in the legend before the query can be executed. Clicking the OK button will close the Query Builder. If the list of queries defined is not empty the GISViewer4 will automatically be in the Select Mode. The user can now select the query shape to be queried according to the descriptions in the table above. The GISViewer can also perform multi shape queries. This is achieved by holding down the Ctrl key on the keyboard while drawing another shape on the main map. A multi shape query result can also be deselected by repeating the shape to deselect. After the successful execution of all the queries in the query list the results will immediately be drawn on the main map according to the defined colours in the Query Builder. Clicking on the Data tab in the GISViewer will display the Query Result data in a table. Query Line: The user is allowed to specify a line on the main map. The GISViewer will execute the query along the specified line. The line is drawn on the main map by clicking on the first point of the line. The next point is specified by moving the mouse cursor to the next point and clicking on the point. The last point is specified by a double click on the last point. Query Polygon: The user is allowed to specify a polygon on the main map. The GISViewer will use the boundaries of the specified polygon in the query. The polygon is drawn on the main map by selecting the first corner. The following corners are selected by moving the mouse cursor to and clicking on the next point. The last corner is specified by a double click. Query Circle: The user is allowed to specify a circle on the main map. The GISViewer will use the boundary of the specified circle in the query. The circle is drawn on the main map by moving the mouse cursor the centre of the required circle. Holding down the mouse button the user drags the mouse cursor in any direction until the required size circle is obtained. The circle is completed when the user releases the mouse button. 65 Table 11: Spatial Information Toolbar continued... Query Map Feature: The user is allowed to specify a map feature as query shape on the main map. The GISViewer will use the selected feature shape boundary in the query. The map feature is specified by selecting the Query Map Feature as Query Shape in the Query Builder. This will allow the user to specify the map layer on which the required feature appears. The user must also specify the Field and Value required to uniquely identify the required map feature. The user can store a set of defined queries. Clicking the Save Query button open a File Save As dialogue allowing the user to specify the required location and file name. A query file with the extension .gqf will be created. Clicking the Open Query button will allow the user to browse and select a previously stored query file. Query files can also be distributed between users. It is important to note that all the layers indicated in the Selected Map Layer list must be loaded in the main map and must appear in the legend before the query can be executed. Clicking the OK button will close the Query Builder. If the list of queries defined is not empty the GISViewer4 will automatically be in the Select Mode. The user can now select the query shape to be queried according to the descriptions in the table above. The GISViewer can also perform multi shape queries. This is achieved by holding down the Ctrl key on the keyboard while drawing another shape on the main map. A multi shape query result can also be deselected by repeating the shape to deselect. After the successful execution of all the queries in the query list the results will immediately be drawn on the main map according to the defined colours in the Query Builder. Clicking on the Data tab in the GISViewer will display the Query Result data in a table. Clicking the Clear Query Results button will clear all the query results stored and Clear Query Results displayed on the main map. Note that the Clear Query Results will only clear the results, and not the query definitions in the Query Builder. 66 Table 11: Spatial Information Toolbar continued... Clicking the Map Properties button launches the Map Properties dialogue. The user can set or change the map properties in this dialogue. Map Properties The Map Properties dialogue controls the appearance and cancels action of the main map section of the GISViewer as well as the global file path settings for the GISViewer4. The following appearance settings can be done: • The Main Map section can be set to appear Flat or 3D by selecting the matching radio button. • The background colour of the Main Map section can be set to any colour. • The border around the main map section can be switched on or off by selecting or deselecting the Border checkbox. • The Cancel Action on Escape controls the drawing behaviour of the main map when the escape (ESC) key is pressed during drawing: o None: No action occurs and the GISViewer4 ignores the escape key. o Cancel Map: The GISViewer4 stops drawing all layers. Only the features drawn before the user pressed the escape key will be visible on the Main Map. o Cancel Layer: The GISViewer4 stops drawing the layers it is currently drawing and starts drawing the next layer. 67 Table 11: Spatial Information Toolbar continued... • The File Path settings set the global file paths for the GISViewer4. Two file paths are set namely: o Covers Directory: This directory specifies the default directory where the shape files for the default layers are stored. Shape files specified in the XML startup file must be located in this directory. o XML Startup File: This file path must specify the XML startup file. The XML startup file is loaded automatically when the GISViewer is started. The Map Properties also displays the current Top, Bottom, Left and Right extent coordinates of the main map in read only format. Clicking the Coordinate Display button launches the Coordinate Settings dialogue. The user can change the way that coordinates are displayed in the statusbar in this dialogue. Coordinate Display Help Clicking the Help button displays the GISViewer help. 5.2.3.2.2 GIS Tab A typical screen shot of the GIS tab is shown in Figure 23. The GIS tab consists of the following components: • Legend (left hand side of the interface) • Main map (situated to the right of the legend) • Locality map (situated below the legend) 68 Main Menu Main Toolbar Toolbar Legend Locality Main Map Statusbar Figure 23: SAGDT GIS Interface (Spatial Information) 5.2.3.2.2.1 Legend The legend appears to the left of the main map and is used to identify and control all the visible features on the main map, as shown in Figure 23. Map layers are drawn on the main map in the same sequence as they appear in the legend. The bottom layer will be drawn first, with the layer directly above next until the top layer is drawn. The legend is shown in Figure 24. 69 Figure 24: Spatial Information Legend The legend uses a set of images to identify and indicate the nature and purpose of the legend items and visible features on the main map. These images with their description are documented in Table 12. Table 12: Legend Image Descriptions Image Type Description Indicates the Main Layers Section in the legend. All the Layers and Layer related Main Layer items appear under this section. The section for main layers can be opened and closed by clicking on the small + or – in front of the legend image. This image in the tree indicates that the Layer is a point symbol layer. A point symbol is drawn on the main map to indicate a single position on the map. The symbol, size Point Layer and colour of the image indicate the symbol, size and colour of the point symbol on the main map. The symbol can be a square, circle, triangle or a cross. This formatting can be changed in the Layer Properties. This Image in the tree indicates that the layer is a line layer. Line symbols are drawn on the main map to indicate routes for example rivers. The style, size and colour of Line Layer the line image indicate the style, size and colour of the lines as they appear on the main map. The possible line styles are solid, dash, dot, dash dot and dash dot dot. This can be changed in the Layer Properties. 70 Table 12: Legend Image Descriptions continued... This image in the tree indicates that the layer is a fill symbol layer. Fill symbols are used to indicates areas and their respective boundaries on the main map for example the provinces of the country. The outline colour and size, fill style and colour of the Fill Layer image indicates the colour of the area on the map as it appears on the main map. The possible fill styles are solid, transparent, horizontal, vertical, upward diagonal, downward diagonal, cross and cross diagonal. This can be changed in the Layer Properties. This image indicates that the Layer is a raster or image layer. No properties can be changed for this layer type. The colour and shape of the image is constant for all Raster Layer raster or image layers and has no resemblance to the way that the raster or images appear on the main map. The lock appears in conjunction with the layer type image in the legend. The lock indicates that the layer cannot be removed from the main map by the user. The locked Locked Layer property of a layer can be set in the XML file. The Layer is loaded when the GISViewer starts and remains on the main map until the GISViewer is closed. The plane appears in conjunction with the layer type image in the legend. The plane indicates that a flyover setting is active for the layer. The selected field values will be Flyover Active indicated in the statusbar as well as in hints appearing over the main map when the mouse cursor is moved over features on the main map. Class Breaks This image indicates that a Class Breaks Renderer has been added to the layer. The Renderer categories for the renderer are displayed under this item. This image indicates that a Value Renderer has been added to the layer. The Value Renderer rendered value list with associated colours is displayed under this item. Label Renderer This image indicates that a Label Renderer has been added to the layer. The render colour image appears before the categories or values for Class Breaks and Value renderers. The colour of the image indicates the colour of the feature Render Colour rendered on the main map. In the case of a Class Breaks Renderer the outline thickness can indicate the thickness or size of the feature rendered on the main map. Indicates the Locality Layer section. The locality layer that is loaded, appears under Locality Layer this item. This image indicates and controls the visibility of the layer or renderer on the main map. When the user clicks on this image, the visibility of the layer or renderer is Layer Visibility toggled. A checked box indicates that the layer or renderer is visible on the main map while the empty box indicates that the layer or renderer is not visible. The legend popup menu can be utilised to control and manipulate the layers and renderers on the main map. The popup menu is accessed by a right mouse click on the legend. The popup menu options are listed in Table 13. 71 Table 13: Legend Popup Menu Menu Item Description This action will remove the selected layer from the main map. Locked layers cannot be Remove Layer removed by the user. The Remove Layer menu item is grayed out for locked layers. This action will remove any layer loaded as locality map and load the selected layer as the Set as Locality new locality map. A locality layer item will appear under the Locality Layer. This action will launch the Label Renderer dialogue allowing the user to add a Label Renderer to the selected layer on the main map. Layer Renderer Add Label Renderer The Label Renderer is used to place attribute data on a feature drawn on the map. The values contained in the Render Field selected will be used as the text to be displayed in the labels. The Font Example text indicates the font type, colour and size to be used for the labels. The font can be changed by clicking on the Change Font button. This will display the standard Font dialogue. This action will launch the Class Breaks Renderer dialogue allowing the user to add a Class Beaks Renderer to the layer on the main map. Layer Renderer Add Class Breaks Renderer The Class Breaks Renderer is used to draw features according to categorisation criteria. Any numeric data field can be categorised and drawn accordingly. The user must select the field containing the values to be categorised. The user sets the number of categories or groups by changing the position of the Number of Groups slider. The user can select the Ramp Colours option to automatically ramp the colours for each categorisation according to the numeric values of the category. If the user does not select Ramp Colours the GISViewer will assign random colours for each category. The random colour of the categories will not be related to the numerical value of the category at all. 72 Table 13: Legend Popup Menu continued... The user can also select to ramp the size of the feature by selecting the Ramp Size option specifying the size range. In the case of Fill type layers the outline thickness will be sized. In the case of Line type layers the line thickness will be sized. In the case of Point type layers the outline thickness of the point symbol will be sized. Clicking on the Advanced Settings button will display the calculated statistics for the selected field. The Count, Sum, Mean, Minimum, Maximum and Standard Deviation values are shown. The user has the option of letting the GISViewer automatically calculate equal sized categories for the selected field, or can select to specify user defined categories by selecting Use User Defined Values. The user must specify the minimum, maximum and break values. The number of breaks required in the comma delimited list is equal to the Number of Groups set minus two. This action will launch the Value Renderer dialogue allowing the user to add a Value Renderer to the layer on the main map. Layer Renderer Add Value Renderer The Value Renderer is used to control the drawing of map features according to any data field value. The Value Renderer can be applied to numeric as well as text fields. The user needs to select the field that should be used to render the selected layer. All the available field values are displayed in the Available Values List. The user can select the required fields and move them to the Render Value List by using the Move buttons between the two lists. If the Auto Colour check box is checked the GISViewer will assign default colours to all the values in the Render Value List. When Auto Colour is unchecked the random colours assigned to each value in the Render Values list is displayed in the Render Values list. These colours can be changed by selecting the values to be changed and clicking in the change colour button. Numeric fields can be colour ramped according to the value relative to the maximum and minimum values in the Render Values list. The Begin and End colours can be defined by clicking on the colour panels. Clicking the Ramp Colour button will assign a new colour scale to each value in the Render Values list. If a check mark appears before the item in the menu, all the selected layer features will be Layer Renderer drawn in addition to the rendered features. If the check mark is removed, only the Draw Background rendered features for the selected layer will be drawn. The check mark is toggled by selecting the Draw Background menu item. 73 Table 13: Legend Popup Menu continued... This action will launch the Flyover Settings dialogue allowing the user to set flyover fields for the selected layer. Flyover Settings The GISViewer provides the user with the functionality to set Flyovers. The Flyover is used to easily identify layer features on the main map. Flyovers display the selected field values for a layer feature in the Status Bar and a Hint popup when the mouse cursor is moved over the main map. Flyover settings can be set up in the Flyover Settings dialogue allowing the user to set flyover fields for the selected layer. The user can select the field values to be displayed. The values will be displayed with an equal sign between them. The first value in the Flyover indicates the layer. The user can specify flyover settings for more than one layer. If the cursor moves over map features, the top layer flyover is shown. If there is no feature for the top layer at that point, the feature for the next layer with flyover settings is displayed. This action will launch the Search Features dialogue allowing the user to search for certain features of the selected layer by providing the field and value to search for. Search Features The user must select the field containing the value to search for in the Search Field drop down box. All the available field values will be displayed in the Search Value list. Selecting the desired value in the list of Search Values and clicking the Locate button will search for the feature selected in the current map extent. If the feature is found the map extent will be adjusted to fit the size of the feature and the will be flashed three times on the main map. The user can also just double click on the required value in the Search Value list instead of clicking the Locate button. 74 Table 13: Legend Popup Menu continued... This action will launch the Layer Properties dialogue allowing the user to set and change all the available Layer Properties. The way that a layer is drawn on the main map is controlled by the Layer Properties. The Layer symbol type is displayed at the top of the Layer Properties dialogue. The following settings are available in the Layer Properties dialogue: Layer Name: This property displays the selected layer name as it appears in the Legend. Locked Layer names and aliases are controlled in the XML Startup File and cannot be changed in the Layer Properties dialogue. Layers not locked can be renamed in the Layer Layer Properties Properties dialogue. Style: The Style property indicates the different styles in which the feature on the main map can be drawn, and is different for the different types of Layers. Point symbols can be a square, circle, triangle or a cross. Line Symbols can be solid, dash, dot, dash dot and dash dot dot. Fill symbols can be solid, transparent, horizontal, vertical, upward diagonal, downward diagonal, cross and cross diagonal. Colour: The colour on the panel indicates the colour in which the features for the selected layer will be drawn. The colour can be changed by clicking on the colour panel and selecting a new colour. Size: The Size property differs for the different layer symbol types. For Point symbols the size property indicates the relative size of the point symbol. For Line Symbols the Size property indicates the thickness of the line. For Fill symbols the Size property indicates the thickness of the feature outline or boundary. Outline Visible: This option is only available for Point and Fill Symbols. If Outline Visible is selected the outline of the Point or Fill symbol outline or boundary is drawn according to the Outline colour. If it is not selected no outline or boundary is drawn. Outline Colour: This option is only available for Point and Fill Symbols. The colour of the outline or boundary of the Point or Fill symbol is indicated by the colour on the panel. The colour can be changed by clicking on the panel and selecting a new colour. 75 Table 13: Legend Popup Menu continued... Remove Renderer This action will remove the selected renderer from the Layer. This action will launch the Layer Mapping dialogue allowing the user to map layer fields to another layer. This functionality is only available for Locked Layers. The menu item is grayed out for layers that are not locked. Layer Mapping Users are not allowed to remove Locked Layers from the main map. The user might, however, have a similar layer file containing more up to date data. The user can define a Layer Mapping to insure that the latest data is brought into the Locked Layer Query results. If the Use Layer Mapping option is selected in the Layer Mapping dialogue, a check mark appears before the Layer Mapping menu item for the selected locked layer. The user must specify the Map to Layer by selecting the appropriate layer in the drop down box. Only layers not locked will be available in the drop down box. The available fields will be indicated in the Layer Fields to Map list. A field map is created by selecting a field in the Layer Fields list and selecting the corresponding field in the Layer Fields to Map list. Clicking the Map button will add the field map to the list at the bottom. The Layer Field values will be replaced by the Layer Fields to Map values for the Query Locked Layers results. Any number of field mappings can be created. This action will launch the Layer File dialogue allowing the user to search for and select the required layer. The user can select which layer type to search for by changing the files of type drop down box in the dialogue. The following file types are supported: Add Layer File GIS: shp (shape files) CAD: dgn, dwg, dxf Image: tif, tff, bmp, jpg, bil, bip, rlc, sid, sun, ras This action will launch the Layer File dialogue allowing the user to search for and select Load Locality Map the required layer. The user can select which Layer type to search for by changing the files of type drop down box in the dialogue. 76 Table 13: Legend Popup Menu continued... This action will move the selected Layer to the fist or top layer in the legend and will be Move to Top drawn last on the main map, on top of all the other layers. This action will move the selected layer to the last or bottom layer in the legend and will be Move to Bottom drawn first on the main map, below all the other layers. The legend popup menu items are enabled or disabled according to the node type as shown in Table 14. Table 14: Legend Node Type Popup Menu Items Node Type Applicable Items Main Layer Add Layer File Remove Layer (Only for Layers not Locked) Set as Locality Layer Renderer + Sub Items Point Layer Flyover Settings Line Layer Search Features Fill Layer Layer Properties Layer Mapping Move to Top Move to Bottom Remove Layer Layer Properties Raster Layer Move to Top Move to Bottom Remove Renderer Renderers Move to Top Move to Bottom Locality Layer Load Locality Map The layers loaded in the main map are shown on the legend. The appearance settings and layer functionality are controlled from the legend. The order in which layers are drawn are determined by the order in which the layers appear in the legend. The layers are drawn sequentially as they appear in the legend. 5.2.3.2.2.2 Locality Map The locality map section displays one map layer referred to as the locality layer. The locality section displays a red box (locality) within South Africa, as shown in Figure 25. The locality indicates the boundaries of the current extent of the main map. The locality can be moved to any new position on the locality map by clicking the desired new centre on the locality map. The extent of the main map will also be changed accordingly. 77 The user can use the locality map to keep track of the current extent of the main map in terms of the bigger picture. The user can also use the locality map to navigate the main map extent to the desired location after the desired zoom level is set. It is therefore similar to the pan mode. The user can load or remove the locality layer using the popup menu. The popup menu is displayed when the user right clicks anywhere on the locality map. The locality layer is displayed in the legend. The appearance of the locality layer can be set in the layer properties dialogue. The layer properties for the locality layer can only be launched from the legend popup menu. Figure 25: Spatial Information Locality Map 5.2.3.2.2.3 Main Map The main map section of the GISViewer displays all the loaded and visible map layers. The main map section is where all the visual information is displayed. This also includes all the available rendering and query results. A popup menu is displayed when the user right clicks anywhere in the main map section, as shown in Figure 26. The user can then toggle all the other main sections of the GISViewer. Figure 26: Main Map Popup Menu 78 The user can launch the map properties from the popup menu by selecting properties. The map properties control the appearance of the main map section. The current map extent is displayed as a red box (locality) on the locality map when a locality layer is loaded. 5.2.3.2.3 Data Tab The spatial information data tab presents the layer and query results as a grid representation rather than a graphic one. Grid columns can be sorted by clicking on the selected column heading. An example of the data tab is displayed in Figure 27. Figure 27: Spatial Information Data Tab The data tab only displays the data for the visible layers. Some of the layers have large volumes of data and can result in long waiting times when the data tab is clicked. It is advised that the number of visible layers is kept to a minimum to insure best performance. The data tab displays a tab for each visible layer. The name of the tab corresponds to the layer name in the legend. Each tab contains the data for that layer with the same name. Layers set up in the XML startup file will display only the alias field names and values for the fields set up in the XML file. Layers not set up in the XML startup file will display all the data fields with the original field name. 79 5.2.3.2.4 Status Bar The status bar at the bottom is to give feedback to the user regarding the current status of the spatial information interface. The status bar is shown in Figure 28. Status Flyover Layer Topo Map Current Coordinate Figure 28: Spatial Information Status bar The first panel indicates the current state of the spatial information interface. The state is determined by the status buttons on the toolbar. The possible values for the status are zoom active, pan active, identify active, ruler active, selection active and query active. The second panel displays the flyover information. The selected values for the flyover information are displayed in the status bar when the mouse cursor moves over the features on the map. The third panel displays the scale information when the spatial information Interface is not in measure mode. When in measure mode, ruler active is displayed in the status bar. In this instance, the third panel indicates the length in metre between two selected points on the main map. The fourth panel displays the reference for 1:50 000 topography maps for the selected area when not in measure mode. When in measure mode, ruler active is displayed on the status bar. In this instance, the fourth panel indicates the total length in meters of the perimeter measured. The last panel displays the main map coordinates for the current mouse cursor position. The coordinates can be displayed using the coordinate settings dialogue. 5.3 Unified Modelling Language (UML) This section presents the definitions of the Unified Modelling Language (UML) symbols used in this thesis. UML can be used in a broad spectrum of situations. The definitions and 80 terminology can therefore appear to be very abstract when applied to a specific problem. In order to avoid the confusion and ambiguity that often accompany abstract concepts, the definitions provided in this section are in terms of the specific issues related to the SAGDT software design. The definitions in this section contain both the generic definition under UML and the specific aspect of the topic that the given symbol represents. There will always be a one-to-one relationship between a symbol and the type of element it represents. 5.3.1 Use Case View Symbols The use case view symbols discussed in this section is presented in Figure 29. Figure 29: Use Case Symbols (Object Management Group, 2007) 5.3.1.1 Use Case A step in a use case represents a single item of functionality that the system provides. A step in a use case is associated with a class as one of the responsibilities of that class. A use case step and a class responsibility are the same thing (Object Management Group, 2007). It is important to note that the use case steps presented in this thesis are high level “User Stories” and are not actual class procedures that exist in source code. 81 5.3.1.2 Uses and Extends The UML definition for a uses relationship between two use cases is: “The uses generalization is used to describe common behavior between two or more use cases” (Object Management Group, 2007). A sub use case which is used in the super use case in the normal sequence of events will be shown with this relationship. This can be read as: “The higher use case is made up from the lower use cases.” 5.3.2 Logical View Symbols The logical view symbols discussed in this section are presented in Figure 30. Figure 30: Logical View Symbols (Object Management Group, 2007) 5.3.2.1 Class The UML definition for a class is: “A class captures the common structure and common behaviour of a set of objects. A class is an abstraction of real world items. When these items exist in the real world, they are instances of the class and referred to as objects” (Object Management Group, 2007). Classes will represent the types of physical components of the system. These may be data files, spreadsheets, user interfaces or executable programs. The classes will contain the main properties and responsibilities of these components. 82 It is important to note that the classes presented in this document are “metaphorical” in that they do not actually exist in source code. Classes are highly simplified abstract entities that describe a collection of real source code classes. 5.3.2.2 Inherits The UML definition for an inheritance relationship is: “A generalised relationship between classes shows that the subclass shares the structure or behaviour defined in the super class”. A generalisation relationship is used to show a “is-a” or “kind-of” relationship between classes (Object Management Group, 2007). Inheritance is used to describe the breakdown of the classifications of the components of the system. The inheritance diagram shows “kind-of” relationships between the components of the system. 5.3.3 Rules of Abstraction This chapter has been compiled by applying a very important principle: “A software design document must present a concise overview of the main principles applied in the construction of the software system. A software design document must not simply restate the construction of the system in a different notation.” In other words, UML must be used to present the high level concepts. UML must not be used as an alternative notation to the source code. The key point in this principle is the fact that the design document must be abstract in order for it to add value (Object Management Group, 2007). It would be a simple matter to take the C++ source code and restate it in UML. There are tools that can do this automatically in a matter of minutes. The output from that exercise would be an alternative presentation of the source code in the UML notation and would not summarise the source code. Due to the fact that this exercise would not add “summarisation” or “overview” it is not adding value as a design document. By definition, translating a concept from one notation to another cannot provide an overview of the concept. There is only one way to produce an overview of a concept – leave out the details. For the purpose of this thesis, to leave out unnecessary and unhelpful details, a single “rule of abstraction” has been adopted. A “rule of abstraction” is a rule that ensures that elements 83 introduced in the document are “abstract” or “overview” in nature. The purpose of this rule is to ensure that every element contributes to the document being an overview. Rule of Abstraction: UML Classes are Metaphors A “metaphor” is a simplistic construction that mirrors a complex real world phenomenon for the purpose of describing an aspect of the phenomenon. Metaphors are a very powerful way of describing complex constructions and are used extensively in science. For example, the “Wave Theory of Light” and the “Particle Theory of Light” demonstrate this technique. The “Wave” metaphor is very effective at describing refraction properties of light and the “Particle” metaphor describes the energy properties of light. The fact that light is neither a wave nor a particle does not diminish the effectiveness of the metaphors. Even the fact that the two metaphors contradict each other does not hamper their use. The process of using metaphors in software engineering is best described in Beck (1999). Metaphors are used in this chapter to represent components of the system. These components are highly simplified abstract entities that describe a collection of real source code classes. The UML classes in this document are therefore the metaphors of the system and not actual source code classes. 5.4 Software Functionality and Design This Section is the central part of this chapter. The intended functionality and design of the software is described here. Please refer to Appendix A: Use Case Diagrams for the complete use case diagrams. The use case diagrams should be used as an index to this Section. The descriptions contained in this Section refer to various components of the system, which are responsible for implementing the intended functionality. Each one of these components is represented on a diagram in. The diagrams present a logical arrangement of all the components of the system. 5.4.1 Functional Categories The functionality of the SAGDT has been broken down into seven main categories as shown in Figure 31. Each of these main categories is dealt with separately in the remainder of this Section. 84 Figure 31: Use Case Diagram - Top Level Functionalities 5.4.2 Application Framework Application framework deals with the general construction of the application and the use case is presented in Figure 32. Figure 32: Use Case Diagram - Application Framework 5.4.2.1 System Installation The installation wizard is responsible for system installation. This is a stand-alone executable that launches separate child processes to install the individual sub-systems. Some of the sub-systems are distributed as an “Install Shield” archive. 85 The deployment structure of the SAGDT on a target machine is shown in Figure 33 and Figure 34. Figure 33: SAGDT Deployment Structure 86 Figure 34: SAGDT Deployment Structure continued 5.4.2.2 Database Administration The system has been designed to operate from a Microsoft Access databases and manages a DAO (Data Access Objects) connection to each of the following databases: • Groundwater Resource Assessment Phase II (GRAII) (DWAF, 2005) Database (GRAII.mdb) • SAGDT Database (SAGDT.mdb) 5.4.2.2.1 GRAII Database No direct access is provided to the GRAII data source (DWAF 2005). It is automatically queried when building an area object from a selected point in the spatial information. There exists no entity relationship between the tables in the GRAII data and all the tables have X and Y as primary keys and Z as the value at X, Y for the parameter represented by the table name as shown in Figure 35. 87 Table Name Figure 35: GRAII Database Structure 5.4.2.2.2 SAGDT Database Both the EPA Health Risk Parameters (Environmental Protection Agency, 1994, 1994a) and the Drinking Water Guidelines (Environmental Protection Agency, 2000) are available to the user through selecting the Database Tool available from the object properties popup menu. There exists no entity relationship between the tables. The only table of importance is the _LOOKUP table that is used to populate the lookup lists in the Database Tool. If another table is to be added, the relevant table information must be added to the _LOOKUP table as shown in Figure 36. Table Name Figure 36: SAGDT database tables Various parameters related to the health risk calculations were compiled to separate tables within the SAGDT database. The drinking water guidelines are a compilation of the South African guidelines (DWAF, 1996), which was supplemented with international guidelines (Environmental Protection Agency, 2000) where gaps were identified. 88 5.4.2.3 Menu Management The menu management encapsulates the whole menu system of the application, which also includes all popup menus. The main menu, popup menus and toolbars are created by the main form. 5.4.2.4 Visualiser Management The generic grid editor and the graph viewer are created by the main form through the use of standard components in the development environment (Borland C++ Builder 6 Professional). The application specific parameters to each visualiser is stored and maintained in the registry. The calling functions specify the visualiser type to be setup using these stored values. The spatial information and assessment interface visualisers are realised through the use of existing libraries. The GISViewer constituting the spatial information is based on Map Objects Lite Library form ESRI (Environmental Systems Research Institute, 2007) and the assessment interface is based on TCAD (Codeidea, 2007), which are both commercial library sets. 5.4.2.4.1 Inverse Distance (Shepard) Interpolation The assessment interface creates contour maps from the given grid data. The interpolation scheme implemented is the inverse distance method (Shepard, 1968): N ⎛ ⎞ ∑⎜ fi⎜ ⎟⎟F f = i=1 ⎝ di ⎠ (31) N ⎛ 1 ⎞∑⎜⎜ ⎟ i=1 ⎝d F ⎟ i ⎠ where di = distance between data point i and the center of a model cell fi = value at the ith data point F = weighting exponent f = estimated value at the model cell The weighting exponent must be greater than zero and less than or equal to 10. Figure 37 shows the effects of different weighting exponents. Five data points are regularly distributed along the x-axis. Using higher values for the exponent (e.g., F = 4), the interpolated cell values will approach the value of the nearest data point. The surface is therefore relatively 89 flat near all data points. Lower values of the exponent (e.g. F = 1) produce a surface with peaks to attain the proper values at the data points. A value of F = 2 is suggested by Shepard (1968). Figure 37: Effects of different weighting exponents (Source Chaing and Kinzelbach, 1998) 5.4.2.5 Model Management All model management is done within the model object. Before model execution a new instance of the model is initialised through the use of the properties from supporting objects. On completion of the model run all data are written to the supporting objects and the current instance of the model is destroyed. Verification of model stability is performed in the model object and the following criteria are taken into account when considering stability: • Large grid spacing • Large time steps • High nonlinearity in flow or transport processes • Large length-to-width ratio (cell aspect ratio) • Abrupt changes in time or space discretization • Initial sharp concentration fronts at an inflow boundary, caused by prescribed concentration boundaries 90 • Coarse space discretisation in areas where large responses are expected, in areas where aquifer properties change abruptly, or in areas where boundary conditions change rapidly 5.4.2.5.1 Borehole Drawdown Estimation in a Model Cell One of the challenges in groundwater modelling is the prediction of hydraulic head in close proximity to a pumping well using a regional scale model. Typical applications of numerical models to field-scale problems generally require large grids that can seldom accommodate cells as small as the actual well diameter (Afshari et al., 2004). Rewrite the equation for effective radius re given by Peaceman (1983) in terms of x and y: [(k k )1/ 2y x Δx 2 + (kx ky )1/ 2Δy 2 ]re = 0.28 ( )1/ 4 ( )1/ 4 (32) ky kx + kx ky where kx,y is the permeabilities in the denoted directions. Assuming that kx = ky yields the following result: re = 0.14 Δx 2 + Δy 2 (33) where ∆x and ∆y represent the cell sides of a non-square grid. Through the use of the Thiem equation (Kruseman and De Ridder, 1991) the corrected drawdown at a borehole in a model cell can be approximated by: QWT ⎛ re ⎞hw = hi , j − ln⎜⎜ ⎟⎟ (34) 2πT ⎝ rw ⎠ where hw = Head in the borehole hi,j = Head at node (i,j) QWT = Total abstraction of cell T = Cell transmissivity re = Effective borehole radius rw = Radius of borehole 91 An example of the model drawdown for a borehole versus the corrected drawdown is shown in Figure 38. Figure 38: Model Drawdown vs. Corrected Drawdown This approximation is applied in the SAGDT borehole object to correct the borehole drawdown in a model cell, since drawdown is used to calculate several fuzzy logic inputs to the risk model. 5.4.2.6 Fuzzy Logic Management The favourable and unfavourable limits of the various inputs to the fuzzy logic engine, associated degree of membership functions and the fuzzy rule set are stored in the fuzzy logic library. 5.4.2.6.1 Library Access To access the fuzzy logic library, launch the About box under the Help section of the SAGDT. The backdoor to the fuzzy logic library is shown in Figure 39. 92 Hold down Ctrl and Alt and click here Figure 39: SAGDT backdoor A tab called “Composer Interface” will appear. This has two tree views describing the object and fuzzy libraries. 5.4.2.6.2 Library Format The fuzzy logic inputs and rules are stored in a tree format, as shown in Figure 40. Figure 40: Fuzzy Logic tree structure example The following convention is used regarding the structures described in the rest of this section: • Italic keywords represent variables • Bold keywords represent the fixed part of the structure 93 The first node for each fuzzy logic category is the name of the category followed by the INPUT and the RULES, node which are the respective parents for the fuzzy logic inputs and associated rule set. Each input has the following generic structure: KEY=I? ; NAME=InputName ; F=FavourableVal ; U=UnvavourableVal ; DOM=Expression where I? = Input number ? InputName = Name of the input parameter FavourableVal = Favourable limit for the input UnfavourableVal = Unfavourable limit for the input Mathematical expression describing the degree of Expression = membership functions for the input Note that in the SAGDT, it is assumed that the favourable and unfavourable degree of membership functions are inverses of each other; hence only the favourable membership needs to be specified. The degree of membership functions used in the SAGDT is given in Appendix C: Fuzzy Logic Rules and Member Functions. Each rule has the following generic structure: KEY=R1 ; I1=F ; I2=F ; … ; I?=F ; W=0.0 KEY=R? ; I1=U ; I2=U ; … ; I?=U ; W=1.0 where R? = Rule number ? I? = Input number ? Weight associated with the rule. In this case the weight describes w = the risk associated with the particular rule. Note that the rule set represents all possible combinations of F and U for all the inputs. 5.4.2.6.3 Library Graphical User Interface The toolbar functions available for the library definitions are shown in Table 15. 94 Table 15: Library toolbar Icon Menu Item Description Insert Node Insert child node for the selected node Delete Node Delete the selected node Save Library Save the current library definition Export Library Export the library to a text file 5.4.3 Access Control Access control deals with the management of the users of the system and the rights relating to each user. The use case is presented in Figure 41. Figure 41: Use Case Diagram - Access Control 5.4.3.1 Software Registration The user name and machine specific information is used to generate a key which is sent to a support team. The support team decodes this key and issue the user with a registration code which will register the software through the creation of a license file on the target machine. The registration dialog of the SAGDT is shown in Figure 42. 95 Figure 42: SAGDT Registration Dialog 5.4.3.2 License Verification On startup, the application verifies the existence of a valid licence file before functionality is made available to the user. The level of access is determined during the registration process and application functionality will be made available according to user level. 5.4.4 General GUI Features The general GUI features deal with the graphic user interface functionality that is common to all visual components of the system. The use case is presented in Figure 43. Figure 43: Use Case Diagram - General GUI Features 96 5.4.4.1 Exception Handling The system has an error management module built in at a low level. Selected functions in the system make use of this. When an error occurs, the error details are logged to an error log file. The name of the offending function and module is recorded along with the date and time. The version of the operating system is also logged. The error manager is not used for normal program flow; it only traps errors that the software developer was not aware of. 5.4.4.2 Clip Board Each graphic user interface fully supports the clip board. Various formats are supported including text and bitmaps. The clip board supports copy and paste commands in the Windows environment, making it possible to send and receive data, via the clip board, between controls and applications 5.4.4.3 Printing Most of the visual controls in the system are able to print the information is displayed on them. The format in which the report prints depends on the visual control. The generated report also supports full print functionality. 5.4.4.4 Hints The system provides two hint types on visible controls: • Popup Hint: The popup hint is a short hint that pops up when the cursor hovers above a control. • Status bar Hint: The status bar hint is a long descriptive hint that is displayed as the mouse cursor moves across visible controls in the application. 5.4.4.5 Help The help system consists of the following components: • Application Help File: A Windows help file that describes the SAGDT interface, functions and features. • Object Help Files: Each object has its own help file describing the purpose and functionality of the object 97 • Groundwater Dictionary: The groundwater dictionary contains over 200 terms. Each term has a definition, a description and an explanation as to why the aspect needs to be considered in terms of geohydrology. Animation, photographs and graphics are also included for illustration purposes. • Scenario Wizard: The wizard presents the user with a document describing a specific scenario, a video of step by step instructions in setting up the scenario and the saved scenario file that can be opened in the assessment interface. • Bug Reporting: This allows the user to report any bugs found in the software to the support team. The bug report facility automatically creates an email with the required email address and subject. In addition it attaches the SAGDT error log to the email and then gives the user the opportunity to describe which actions caused the error condition. 5.4.4.6 Import Data The SAGDT supports the following data to be imported: • Borehole Data: The import of borehole data provides an efficient method to create a well field when the required borehole data is available. • Elevation Data: Custom elevation data can be imported into the scenario. • Water Level Data: Custom water level data can be imported into the scenario. • Tripol Water Level Data: The output water level file from Tripol can be imported into the scenario. The imported water level data will be used in the assessment. CSV templates can be exported for each of the above-mentioned data files, except the Tripol water level file. Importing of elevation and water level data does not update the GRAII database and is only used in the scenario for which it was imported. At any stage the imported elevations and water level data can be cleared to revert back to the original GRAII dataset. Through the use of the templates the SAGDT can recognise the type of coordinates used in the file and automatically do coordinate conversions to ensure that the newly imported data align with the scenario base data. 5.4.4.7 Export Data The SAGDT supports the following data to be exported: • Borehole Data: The data of the selected boreholes will be exported to a CSV format. 98 • Elevation Data: The data will be exported to a CSV format. • Water Level Data: The data will be exported to a CSV format. • Contour Data: For each contour map in the scenario, the data will be exported to a x,y,z text file with a xyz extension to denote that it is a grid file. • Tripol Data: The input file for the Tripol application to perform interpolation. • Landscape Explorer Data: An ASCII grid file and a bitmap image of the scenario are exported that can be directly imported in the Landscape Explorer application. The coordinates used in the export is dependent on the coordinate display setting at the time of the export. If the coordinate display is in decimal degrees, the exported files will contain decimal degrees and the same hold true for Cartesian coordinates. 5.4.5 GIS Utility The spatial information deals with the graphical user interface functionality that is common to all visual components of the system. The use case is displayed in Figure 44. Figure 44: Use Case Diagram - GIS Utility 5.4.5.1 Import Shape Files The system provides the functionality to import additional shape files over and above the set of locked layer shape files that are loaded at startup through the use of the XML configuration file, as discussed in Section 5.2.3.1.1. 99 5.4.5.2 Map Shape Files Mapping an imported shape file to a locked layer shape file provides the user with the ability to use a custom shape file in an assessment rather than the default locked layer shape file. See Table 13 for details. 5.4.5.3 Build Query The system provides the functionality to build a spatial query utilising the existing layers in the GIS utility and applying user defined filter criteria to it. See Table 11 for details regarding the query builder. 5.4.5.4 Run Query Once a spatial query has been build it can be executed to deliver the required results. 5.4.5.5 Visualisation of Results Once a spatial query has been built and executed the results are visually displayed on the GIS utility map. The results from a spatial query are shown on the main map by drawing all features returned in the query results in the colour defined in the query builder. An example is shown in Figure 45, where the dams returned are drawn in yellow, while the rivers are drawn in red. Figure 45: Example of visualisation of query results 100 5.4.5.6 Query Management The system provides the functionality to select, delete and save spatial queries. An open and save dialog is used for this purpose. See the query builder in Table 11 for more detail regarding the query management in the query builder. Query files can also be distributed between users. It is important to note that all the layers indicated in the selected map layer list must be loaded in the main map and must appear in the legend before the query can be executed. 5.4.5.6.1 Select Query The system provides the functionality to select an existing spatial query through the use of an open dialog. Clicking the open query button on the query builder will allow the user to browse and select a previously stored query file. 5.4.5.6.2 Save Query The system provides the functionality to select an existing spatial query through the use of a save dialog. The user can store a set of defined queries. Clicking the save query button opens a file save as dialogue allowing the user to specify the required location and file name. A query file with the extension .gqf will be created. 5.4.6 Risk Assessment This Section describes the calculation of risk based on a given scenario defined by the user. The basis of a scenario is a 2D finite difference groundwater model. Not all objects require the groundwater model, but due to the fact that all possible risks are calculated with each assessment, the model run is required. The use case is shown in Figure 46. 101 Figure 46: Use Case Diagram - Risk Assessment 5.4.6.1 Assessment Analysis Verify that the assessment represents a valid scenario according to the rules imposed by the object model. Every time an object property changes a validation is performed on the change. 5.4.6.2 Run Model The groundwater flow model is based on the general flow equation. The general flow equation is formulated by applying the law of conservation of mass over a control volume of an aquifer situated in a flow field (Freeze and Cherry, 1979). The net inflow into the volume must equal the rate at which water is accumulating within the volume under investigation, which leads to ∂ ⎛ ⎞⎜T ∂h ⎟ ∂h ∂x ⎜ ij ∂x ⎟ = S + Q (35) i ⎝ j ⎠ ∂t 102 where i,j = 1,2,3 (principal coordinate directions) T = transmissivity [L2/T] h = head [L] S = storage [L-1] Q = local sources and sinks per unit volume [1/T] x = space coordinate [L] t = time [T] The flow model is used to determine the travel paths that a contaminant is expected to follow. The transport model is fundamentally different from the flow model in that the objective is to determine the concentration levels of a contaminant. One of the simplest forms of the mass transport equation is given as (Freeze and Cherry, 1979): ⎡ ∂ ⎛ ⎤ ⎢ ⎜D ∂C ⎞ ∂ ⎛D ∂C ⎞ ⎡ ∂ (v C) ∂ (v C)⎤ ∂C q⎟ + ⎜ ⎟ − + = + s C (36) ⎣∂x x ∂x ∂y ⎜ y ∂y ⎟⎥ ⎢∂x x ∂y y ⎥ ∂t n s ⎝ ⎠ ⎝ ⎠⎦ ⎣ ⎦ e Where v is the linear groundwater velocity in the respective direction, C is the concentration of solution, qs is a volumetric flux (due to a source or a sink), Cs is the concentration of the source or sink and ne is the effective porosity. The equations above are implemented as a 2D finite difference model. The set of equations are solved through the use of the Preconditioned Conjugate Gradient method (Hill, 1990). Although it is common knowledge that the finite element flow model is more stable over large hydraulic discontinuities, the finite difference method was chosen due to the simplicity of implementation. 5.4.6.3 Run Analysis Perform the actual risk assessment based on the inputs that define the scenario via fuzzy logic degree of membership functions that are evaluated against a set of fuzzy logic rules. Each object is evaluated for all the fuzzy inputs in the fuzzy risk model. Before the risk is calculated for an object, a list is compiled from the object properties for all available fuzzy logic inputs. This process is then repeated for the object’s parent and for the parent’s parent until the area object is reached. As the different objects are traversed in the tree the list gets 103 build with the fuzzy logic input parameters. If an input already exists in the list and the same input is encountered at a higher level, it is ignored. This process is described as inheritance from the parents and is valid, since all these objects are related. Once the list of all inputs is available it is passed to the fuzzy risk model for evaluation, as shown in Figure 47. Risk categories presented in Figure 47 illustrate the fact that combinations of fuzzy logic inputs represent the various risk categories. Figure 47: Risk Assessement Model The list of fuzzy inputs is passed to the risk model and all risks are calculated for the object. In Figure 47 the solid line arrows denote the fuzzy logic inputs that exist in the list and the dotted arrows the fuzzy inputs that could not be found in the list. All inputs that are not found in the list are assumed to be favourable to result in a 0% risk. 5.4.6.4 Sensitivity Analysis A data confidence value (0-100%) is assigned by the user to the properties of an object. This data confidence value is used to calculate how much the fuzzy logic inputs should vary according the inputs favourable and unfavourable limits. Each fuzzy logic input is then varied according to the calculated range and the sensitivity for each input is then calculated as follows: 104 Change in Risk Sensitivity = 100 (37) 1 Change in input− Input The highest sensitivity is displayed next to the associated risk category, but the individual sensitivities can be displayed as shown in the example in Figure 20. 5.4.6.5 Produce Report Overall risk together with the risks associated with each participating object and object properties are available in the report. A snapshot of the current scenario is also presented in the report. 5.4.7 Assessment Manager The assessment manager allows the user to build an assessment in a graphical environment. The assessment manager is responsible for enforcing object connection rules and the management of the assessment files. The use case is presented in Figure 48. The associated use case of all the objects is not presented here for the sake of simplicity and the fact that the object list has been presented in Section 5.2.2.3.2. The use case for all objects is available in Appendix A: Use Case Diagrams. 105 Figure 48: Use Case Diagram - Assessment Manager 106 5.4.7.1 Select Assessment Open a saved assessment file through the use of an open dialogue. The scenario tree is recreated with all the information that was saved. 5.4.7.2 Copy Assessment Save an existing assessment to a different file name through the use of a save as dialog that will save the current scenario to the new specified filename. 5.4.7.3 Delete Assessment Delete a saved assessment file through any of the open or save as dialogs. 5.4.7.4 Create Assessment The following abstract use cases describe the process of creating an assessment. 5.4.7.4.1 Create Assessment Area Object A single point is selected in the GIS utility. The properties obtained from the point in the GIS utility are then translated to a representative area object. The visible extent of the GIS utility defines the extent of the area object. The area properties are then refined through the use of the GRAII database. The area creation process is shown in Figure 49. Figure 49: Creating the assessment area object 107 Purpose The area object defines the area on in which the scenarios are build. Parents None Object Type Area Properties Calculations %Recharge 100* ⎛Recharge= ⎞⎜ ⎟ ⎝ Rainfall ⎠ The slope is calculated through a curve fitting method as shown in the example below: 108 5.4.7.4.2 Create Assessment Model Object Purpose 2D finite difference flow and transport model Parents Area Object Object Type Area Properties Calculations Numerical solution to the 2D finite difference flow and transport model. 109 5.4.7.4.3 Build Object Tree This category encapsulates the building of the scenario through the addition of objects to represent the scenario to be modelled. 5.4.7.4.3.1 Add Objects To reduce over head the abstract use cases will not be shown for each of the objects. This section will look at the detail regarding each object that can be added to the scenario. Borehole Object Purpose To add a source or sink to the 2D finite difference flow model. Parents Area Object Object Type Point Properties Calculations Water Level = Elevation – Groundwater Level – Drawdown Static Water Level = Elevation – Groundwater Level Water Strike = Elevation – Main Strike Favourable Q = Blow Yield * 0.1 Unfavourable Q = Blow Yield * 0.6 110 Reference Van Tonder (2007) Boundary Object Purpose Digitise areas of variable transmissivity on the model area. Parents Area Object Object Type Area Properties Calculations None Dam Object Purpose Assign a constant head to model cells Parents Area Object Object Type Area Properties Calculations None River Object Purpose Assign a constant head to model cells Parents Area Object Object Type Area Properties Calculations None 111 Wetland Object Purpose Delineate a wetland area Parents Area Object Object Type Area Properties Calculations None Sea Object Purpose Assign a constant head and elevation of 0 mamsl to model cells Parents Area Object Object Type Area Properties Calculations None Logan Object Purpose Calculate the transmissivity according to Logan’s method Parents Borehole Object Object Type Function Properties Calculations Transmissivity 1.22 * Discharge Rate= Logan Drawdown Reference Misstear (2001) 112 Slug Object Purpose Calculate the transmissivity according to slug method Parents Borehole Object Object Type Function Properties Calculations T = 5 *117155.08 * (Recession Time * 60 * 60 )−0.824 Reference Vivier et al. (1995) Cooper-Jacob Object Purpose Calculate the transmissivity according to the Cooper-Jacob curve fitting method Parents Borehole Object Object Type Function Properties Calculations s 2.3Q log⎛ 2.25Tt= ⎞⎜ ⎟ 4πT ⎝ r 2S ⎠ where Q = Discharge rate r = Radius of borehole s = Drawdown S = Storativity T = Transmissivity t = Time since start of pumping T 2.3Q= (gradient of straight line on log scale) 4πΔs 113 Reference Kruseman and De Ridder (1991) Chloride Object Purpose Calculate the recharge according to the Chloride method Parents Borehole Object Object Type Function Properties Calculations Recharge Chloride in Rainfall * Rainfall= Chloride in Groundwate r 114 Reference Taken directly from Van Tonder and Xu (2001) General Equation: R = (P Clp + D)/Clw [R = recharge (mm/a); P = mean annual precipitation (mm/a); Clp = chloride in rain (mg/l); D = dry chloride deposition (mg/m2/a); Clw = chloride concentration (mg/l) in soil water below active root zone in unsaturated zone OR Clw = chloride concentration (mg/l) of groundwater where for many boreholes the Clgw = harmonic mean of the Cl content in the boreholes]. Assumptions: The assumptions necessary for successful application are that (1) there is no source of chloride in the soil water or groundwater other than that from precipitation, (2) chloride is conservative in the system, (3) steady-state conditions are maintained with respect to long-term precipitation and chloride concentration in that precipitation, and in the case of the unsaturated zone, (4) a piston flow regime, which is defined as downward vertical diffuse flow of soil moisture, is assumed. However, this assumption may be invalidated if the flow through the unsaturated zone is along preferred pathways. Earth Object Purpose Calculate the recharge according to the Earth method Parents Area Object Object Type Function Properties Calculations dh ⎛ h ⎞S = R − ⎜⎜ ⎟⎟ dt ⎝DR ⎠ where DR = Drainage resistance h = Water level data R = Recharge S = Specific Yield t = Time 115 Reference Taken directly from Van Tonder and Xu (2001) EARTH= Extended model for Aquifer Recharge and soil moisture Transport through the unsaturated Hardrock General Equation: Sdh/dt=R-h/DR [R = recharge (m3/month); S = specific yield and dh/dt = change in water level head during one month; DR=drainage resistance (a site specific parameter); h=groundwater level] Equation 1: Linear transfer function: hi = h i-1 -Δt h i-1/DR+Δt Ri/S DR=L2/βT, L=length of flow path; β=2 for radial and =4 for parallel flow; T=transmissivity Δt=time interval (1 month) To obtain unique fit, the value of S must be known a priori Data Requirements • Monthly water levels and precipitation Area Pollution Object Purpose Provide an area pollution source to the model Parents Area Object Object Type Area Properties Calculations None 116 Point Pollution Object Purpose Provide an area pollution source to the model Parents Area Object Object Type Point Properties Calculations None Mine (Opencast) Object Purpose Provide an area pollution source related to an opencast mine Parents Area Object Object Type Area 117 Properties Calculations Recharge [m3/d] = 2.738 * Recharge [mm/a] * Area [km2] Decant Rate = (2.738 * Recharge * Area) + ((Inflow Length – Outflow Length) * T * Groundwater Gradient) Decant Time = ((Mine Depth * Area * SSpoils * 1000000) / ((2.738 * Recharge * Area) + (Inflow Length * T * Groundwater Gradient))) / 365 if (Decant Rate = 0) then SO4 = 0 else SO4 = (100000 * Sulphate Generation * Area) / Decant Rate Ionic Strength = SO4 * 0.00005 Max Ca = 40000 * (2.63E-5 / (((10^(-2.0425 * ((IonicStrength^0.5) / (1 + (IonicStrength^0.5))))) / 96000) * SO4)) Max SO4 = 96000 * (2.63E-5 / ((Ca / 40000) * (10^(-2.0425 * ((IonicStrength^0.5) / (1 + (IonicStrength^0.5))))))) Concentration = if (SO4 > Max SO4) then SO4 = Max SO4 Sulphate Load = (Concentration * Decant Rate) / 1000 Reference Dennis et al. (2002) and Usher (2003) 118 Waste Site Object Purpose Provide an area pollution source to the model from a waste site Parents Area Object Object Type Area Properties Calculations None Seawater Intrusion Object Purpose To calculate the governing parameters for seawater intrusion at a borehole Parents Borehole Object Object Type Point Properties Calculations Delta = Salt Water Density / Fresh Water Density if (Water Level > 0) then Distance of Intrusion = ((Delta-1)*AquiferThickness / (2*Water Level / Distance from Sea))) else Distance of Intrusion = Distance from Sea Reference Dennis et al. (1986) 119 Ecological Object Purpose To model the impact on the riparian zone Parents River Object Wetland Object Object Type Point Properties Calculations Root Exposure = (Water Table + Drawdown – Capillary Rise) - Root Depth Toxin Object Purpose To calculate the toxicity risk associated with a borehole. Toxic risks compare the average daily dose of a contaminant to a reference dose calculated for that specific contaminant. Once the average daily dose is equal to or greater than the reference dose, the risk of a person suffering toxic effects due to exposure to contaminant y is 99%. Parents Borehole Object Object Type Point Properties 120 Calculations Total Dose = Concentration * Intake Rate * Assessment Time Daily Dose = Total Dose / (Body Weight * Assessment Time) Toxic Risk = Daily Dose / Reference Dose Reference Environmental Protection Agency (1989) Carcinogen Object Purpose To calculate the carcinogenic risk associated with a borehole. The risk number represents a probability of the occurrence of cancer cases. For example: contaminant x might be expressed as 10E-5 or 0.000001 – meaning one case of cancer per population of 1,000,000 is expected when the population is exposed to a certain concentration of contaminant x. Parents Borehole Object Object Type Point Properties Calculations Total Dose = Concentration * Intake Rate * Assessment Time Daily Dose = Total Dose / (Body Weight * Life Time * 365) Carcinogenic Risk = Daily Dose * Cancer Potency Factor Reference Environmental Protection Agency (989) 121 Radioactive Object Purpose To calculate the radiogenic risk associated with a borehole. Mortality risk is the age- and gender-specific or total risk of people dying from radiation induced cancers. Morbidity risk is the age- and gender- specific or total incidence of radiation induced cancers. Parents Borehole Object Object Type Point Properties Calculations Total Dose = C * Intake Rate * Assessment Time Radiogenic Risk = Total Dose * Coefficient Reference Environmental Protection Agency (1994a) Radioactive Object (Submerged) Purpose To calculate the radiogenic risk associated with a borehole. Microbiological risk refers to the probability of infection. As the probability tends to 1, the risk increases to 99%. Parents Borehole Object Object Type Point Properties Calculations Radiogenic Risk = Assessment Time * Coefficient * C Reference Environmental Protection Agency (1994a) 122 Microbial (Single) Object Purpose To calculate the microbial risk associated with a borehole. Microbiological risk refers to the probability of infection. As the probability tends to 1, the risk increases to 99%. Parents Borehole Object Object Type Point Properties Calculations Microbial Risk = 1 - e (-1 * rFactor * Number Organisms ) Reference Rose and Gerba (1991) Microbial (Distributed) Object Purpose To calculate the microbial risk associated with a borehole. Microbiological risk refers to the probability of infection. As the probability tends to 1, the risk increases to 99%. Parents Borehole Object Object Type Point Properties Calculations ⎛ ⎛Number Organisms −Alpha⎞ ⎞Microbial Risk = 1 - ⎜⎜1 + ⎜ ⎟ ⎟ ⎝ ⎝ Beta ⎠ ⎟⎠ Reference Rose and Gerba (1991) 123 Herold Object Purpose To perform baseflow separation according to Herold’s method. Parents Area Object Object Type Function Properties Calculations Vegter and Pitman (in Xu and Beekman, 2003) explained the Herold method as follows: Qi = QGi + Qsi where: Qi = total flow during month i QGi = groundwater contribution QSi = surface runoff The assumption is made that all flow below a certain value (called GGMAX) is groundwater flow, hence: QSi = Qi - GGMAX (for Qi > QGMAX) or QSi = 0 (for Qi <= QGMAX) and hence QGi = Qi - Qsi The value of GGMAX is adjusted each month according to the surface runoff during the preceding month and is assumed to decay with time, hence GGMAXi = DECAY.GGMAYi-1 + PG.QSi-1/100 where: subscripts i and i-1 refer to the current and preceding month DECAY = groundwater decay factor (0 < DECAY < 1) PG = groundwater growth factor (0 < PG > 1) An added constraint is that GGMAX may not fall below a specified value, QGMAX. Calibration of this model is achieved by selecting an appropriate value of DECAY, PG and QGMAX so that a realistic division between surface runoff and groundwater is obtained. 124 Reference Xu and Beekman (2003) Reserve Object Purpose To calculate the reserve for a specified area. Parents Area Object Object Type Area Properties Calculations Reserve Percentage 100 * ⎛ (Population * Dependence * Basic Need * 3.65E - 6)+ Baseflow ⎞= ⎜ ⎜ ⎝ ( ⎟ Recharge/1000 )* Area ⎟⎠ Reference GRDM Manual (2005) 125 Availability Object Purpose To calculate the availability of groundwater for a specified area. Parents Area Object Object Type Area Properties Calculations Available = ((Recharge/1000) * Area) – Baseflow - Use Scaled Baseflow Object Purpose Scale the quaternary baseflow proportional this object’s parent area Parents Availability Object Reserve Object Object Type Function Properties Calculations Baseflow = Total Baseflow * (Area / Total Area) Assumption The baseflow has a uniform distribution across the area 126 Scaled Use Object Purpose Scale the quaternary use proportional this object’s parent area Parents Availability Object Object Type Function Properties Calculations Use = Groundwater Use * (Area / Total Area) Assumption The groundwater use has a uniform distribution across the area Scaled Population Object Purpose Scale the quaternary use proportional this object’s parent area Parents Reserve Object Object Type Function Properties Calculations Population = Total Population * (Area / Total Area) Assumption The population has a uniform distribution across the area Probe Object Purpose Plot time series data of drawdown or concentration at a specified point Parents Area Object Type Point 127 Properties Calculations None 5.4.7.4.3.2 Define Dependencies An object’s dependencies are defined in the properties. Once an object has been added to the scenario tree the object, properties update according to the dependencies specified. Various dependency types are shown in Table 9. All object help files and the associated icon files are stored in the “Objects” directory where the SAGDT is deployed, since object definitions are stored in a library and are not hard coded. At any time the user can add another object to the system (except for the curve fitting methods) as long as the object definition adheres to the specified format and the relevant icon and help files are supplied. To access the object library launch the About box under the Help section of the SAGDT. The backdoor to the fuzzy logic library is shown in Figure 39. A tab called “Composer Interface” will appear that has two tree views describing the Object and Fuzzy libraries. The object definition is stored in a tree format as shown in the example in Figure 50. 128 Figure 50: Example of Object Definition The top node describes the name of the object and the first child node has the following format: KEY=OBJECT ; CLASS=ClassType ; MENU=MenuName ; COLOR=DefaultColor ; USER=UserLevel where ClassType = AREA, POINT or FUNC MenuName = Menu name under which object must reside Default color only applicable to AREA objects, but DefaultColor = required for all object types UserLevel = Objects can be made available according to user level The second child object describes which objects the object in question can connect to and has the following format: KEY=PARENT LST=ObjectName LST=ObjectName where ObjectName specifies which objects can act as parent objects for the object in question. The remaining nodes have the following generic format: KEY=AQUIRE ; NAME=Prop ; UNIT=Unit ; DEC=Dec KEY=CALCUL ; NAME=Prop ; UNIT=Unit ; EXPR=Expression ; DEC=Dec 129 KEY=PARAMS ; NAME=Prop ; UNIT=Unit ; MIN=Min ; MAX=Max ; DEF=Def ; DEC=Dec KEY=PARAMS ; NAME=Prop ; UNIT=Unit ; MIN=Min ; MAX=Max ; DEF=Def ; DEC=Dec ; MODEL=TRUE KEY=MODELO ; NAME=Prop ; UNIT=Unit ; MIN=Min ; MAX=Max ; DEF=Def ; DEC=Dec KEY=UPDATE ; NAME=Prop ; UNIT=Unit ; MIN=Min ; MAX=Max ; DEF=Def ; DEC=Dec ; TYPE=Type KEY=LOCKED ; NAME=Prop ; UNIT=Unit ; MIN=Min ; MAX=Max ; DEF=Def ; DEC=Dec KEY=LOCKUP ; NAME=Prop ; UNIT=Unit ; MIN=Min ; MAX=Max ; DEF=Def ; DEC=Dec ; TYPE=Type KEY=UPDATE ; NAME=Prop ; UNIT=Unit ; MIN=Min ; MAX=Max ; DEF=Def ; DEC=Dec ; TYPE=Type KEY=CURVEF ; NAME=Prop ; UNIT=Unit ; MIN=Min ; MAX=Max ; DEF=Def ; DEC=Dec KEY=LOOKUP; NAME=Prop ; UNIT=Unit ; DEF=Def LST=Item ; VAL=Value LST=Item ; VAL=Value where AQUIRE = Acquire property with specified name higher up in the tree CALCUL = Calculate property from other object properties CURVEF = Value obtained from curve fitting LOCKED = Locked property that cannot be altered by the user LOCKUP = Locked property updated through calculation of lower levels LOOKUP = User input required via a selection list MODELO = Property acquired from the model interface UPDATE = Property updated through calculation of lower levels PARAMS = User input required Dec = Number of decimals displayed of the property value Item = Description of list item Max = Maximum value that the property may assume Min = Minimum value that the property may assume Prop = Property Name Type = MINIMUM, MAXIMUM, AVERAGE, HARMEAN, GEOMEAN Unit = Unit associated with the property Value = Value of list item 130 TRUE indicates input to the model: MODEL = • T • S • Concentration 5.4.8 3rd Party Software This section deals with all the 3rd party software packaged with the SAGDT as utilities. The use case is presented in Figure 51. Figure 51: Use Case Diagram - 3rd Party Software 5.4.8.1 Baysian Interpolator (Tripol) Tripol is capable of generating water level data across a grid given the elevation data and the water level of selected boreholes. Tripol was developed by Prof. Gerrit van Tonder, Lisa van Sandwyk and Jeanette Buys at the Institute for Groundwater Studies at the University of the Free State in South Africa. 5.4.8.2 Shape File Editor MapWindow is capable of editing shape files and georeferencing raster images to name a few of the extensive list of functionalities available. Due to the fact that the GISViewer is only a viewer the user can make use of MapWindow to setup the GIS files which can then be imported into the GIS Utility. MapWindow is an open source GIS system developed at Utah State University the USA. MapWindow is available from www.mapwindow.org. 131 5.4.8.3 3D Terrain Visualiser Landscape Explorer is designed to render landscape surfaces colour shaded, overlayed with an image or a combination of the two. The SAGDT provides an export function to generate the required files for this application. Landscape Explorer was developed by Geomanics and is available from www.geomantics.com. 5.4.8.4 Unit Converter Convert is capable of doing unit conversions over a wide range of categories. Convert is supplied to aid users in converting object properties to the correct unit that is required by the SAGDT. Convert was developed by Joshua F. Madison and is available from www.joshmadison.com. 5.4.8.5 XML Editor The XML Editor is supplied to assist the user in editing the XML file associated with the GISViewer in which locked layers and meta data for the shape file can be specified. XML Marker was developed by Symbol Click and is available from www.XMLMarker.com. 5.4.8.6 DXF2xyz Converter DXF2xyz is capable of converting DXF files to xyz text files. DXF2xyz was developed by Paul Guthrie and is available from www.guthcad.com.au. 132 6 Case Studies 6.1 Introduction “No way of thinking or doing, however ancient, can be trusted without proof…” Henry David (2007). This section includes various case studies to illustrate the application of the SAGDT to practical problems. The single biggest challenge in setting up a scenario representing a case study is the amount of available data. In practice it is often found that required data are not available and therefore certain assumptions regarding the scenario are to be made. Note that all the data files used in the case studies are available on the DVD that accompanies this document under the Case Studies folder. The actual project files are available from the SAGDT Wizard together with a video file illustrating the setup of each case study. 6.2 General Modelling Parameters The following dispersivity values are used in all of the case studies that rely on the transport model (Spitz and Moreno, 1996): • Longitudinal Dispersivity = 50m • Transverse Dispersivity = 5m The molecular diffusion is set to 0 m2/d for all case studies that rely on the transport model due to the fact the advection followed by dispersion are the major processes that govern the mass transport (Spitz and Moreno, 1996). 133 6.3 VULNERABILITY: Fish River Lighthouse (Mouton, 2006) 6.3.1 Background A new estate is planned near Fish Point, east of Port Alfred. The purpose of this case study is to consider the aquifer vulnerability, groundwater as a potential source of bulk water and the cumulative effects of sustained groundwater abstraction. It is the intention to develop 120 units, with the demand per household estimated at 1.0 m³/day. Therefore if the development is fully subscribed, the total bulk water requirement will be approximately 120 m³/d. There is presently no bulk municipal supply; hence supply is to be from groundwater. This will require the abstraction of 1.4 l/s over a 24-hour pump schedule to meet the demand. 134 6.3.1.1 Location The Fish River Lighthouse is situated at the southern terminus of the access (gravel) road, which branches to the south off the R72. The proposed development area is located on the farm Palmiet Annex 239, located essentially midway between Seafield/Kleinemonde and the Fish River Sun and falling within the Ndlambe Local Municipality. The property has a narrow, longitudinal shape, centrally situated around the Fish River Lighthouse or Port Net enclave as shown in Figure 52. The portion set aside for housing coincides with the north-facing slope of the most inland, vegetated dune. The site is currently undeveloped with an aerial extent of 201 ha and is zoned agricultural. Figure 52: Fish River Lighthouse (Carpe Diem) study area 6.3.1.2 Physiography and Drainage The intended development is located in the P40D quaternary catchment, which may be described as a mildly undulatory coastal plain. Some positive relief manifests itself as fossil 135 dunes (max height 122 m), mainly to the south of the R72 road. Local relief is from 73 m (beneath the lighthouse) to several metres above sea level adjacent to the mobile dunes and estuary mouth. The quaternary catchment P40D has a surface area of 245.7 km2, a mean annual precipitation of 666 mm/a that produces a mean annual runoff of 13.3 Mm3/a or 54 mm/a (WR90). While the baseflow was estimated in the WR90 to be 0 mm, Vegter assigned a baseflow of 2 mm/a to the catchment. 6.3.1.3 Geology Schematic geological cross sections are shown in Figure 53 and Figure 54. In these figures, the Witpoort Formation is depicted in light blue, the Alexandria Formation in pink, the Nanaga Formation in orange and the modern dunes are shown in yellow. Figure 53: Fish River Lighthouse NW-SE cross section 136 Figure 54: Fish River Lighthouse SW-NE cross section 6.3.1.4 Geohydrology 6.3.1.4.1 Aquifers Two general types of aquifers are found in the area: • Shallow primary (intergranular or porous) aquifers in the Algoa Group (Alexandria and Nanaga Formation) and the quarternary Schelmhoek Formation. • The deeper secondary (fractured) aquifer in the Witpoort Formation. The main aquifer with a permanent water table is found in the fractured quartzite of the Witpoort Formation. Borehole yields in this arenaceous formation in excess of 2 l/s are not uncommon. The overlying aeolian deposits of the Nanaga and Schelmhoek formation (primary/porous aquifers) sustain a type of perched water table after periods of prolonged precipitation. These perched aquifers seem to develop due to hydraulic conductivity differences at the base of the aeolian sands or conglomerates (laterally discontinuous Alexandria Formation), where they are underlain by the comparably less permeable quartzites of the Witpoort Formation. Where present, the basal conglomerates of the Alexandria Formation will allow rapid lateral movement of water towards the sea. 137 6.3.1.4.2 Hydrocensus A hydrocensus was undertaken in and around the property, with particular emphasis being placed on the immediate catchment area. Borehole data gathered during this field visit are presented in Table 16; the base plan indicating location of boreholes, wind pumps, reservoirs and springs/wetlands is given in Figure 55. Table 16: Fish River Lighthouse hydrocensus BH Depth SWL SWL Elevation Strike Yield No.# (m) (mbgl) (mamsl) (mamsl) (mbgl) (l/s) Remarks 1(s) 102 40.15 20.85 20 - 0.70 Iron bacteria and dangerous levels of E. coli. 2 - - - - - - Collapsed. 3 33.5 - - - - - Wind pump - broken 4 - - - - - - Wind pump - blocked at 3 m. 5(s) - 18.75 66.25 90 - Strong? Borehole supplying Booth residence. 6 (s) ~31 14.8 45.20 - - - Supplies reservoir #10. 7 - 11.95 52.05 60 - - Borehole capped. 8 20.72 4.0 71.00 89 - Strong? Borehole previously used for irrigation. 9 20.9 - - - - - Borehole supplying Cutten residence. 10 - - - - - - Reservoir filled by BH#6 11(s) - - - - - - Reservoir filled by unknown borehole on Fort D’Acre 12 180 14.3 75.70 89 71 1.35 DWAF ‘03 13 180 - - - 126 4.0 DWAF ‘03 14 180 - - - 47 1.32 DWAF ‘03 15 ~38 - - - - 1.1 DWAF ‘89 16 ~38 - - - - 1.1 DWAF ‘89 17 ~38 - - - - 1.1 DWAF ‘89 18 ~38 - - - - 1.1 DWAF ‘89 19(s) 60 7.6 12.4 - 24; 38 3.32 New borehole. Blow yield ~ 6.0 ℓ/s. Coliform count > 100 138 Figure 55: Fish River Lighthouse hydrocensus positions From the limited elevation data that is available, it is clear that there exists a reasonable correlation between topography and water levels across the area as shown in Figure 56. 139 Figure 56: Fish River Lighthouse borehole elevations vs. borehole water levels A cross section of the topography and generated water levels from the Northwest to the Southeast across the model area is shown in Figure 57. Figure 57: Fish River Lighthouse model NW-SE cross section 140 The conceptual hydrogeological model for the Fish River Lighthouse area is shown in Figure 58. Figure 58: Fish River Lighthouse conceptual hydrogeological model 6.3.2 Assumptions The following assumptions are made regarding the scenario for the purpose of this thesis due to a lack of information required by the SAGDT: • In general the water level follows the topography • Aquifer thickness = 40 m • Storativity = 0.001 • Baseflow = 0.0 Mm3/a • Recharge = 25 mm/a • Soil Type = Sand • Aquifer Media = Intergranular • Vadose Zone = Beach Sands • Coliform present in borehole 19 is assumed to be Escherichia • The data confidence of all objects = 80% 141 6.3.3 Modelling Methodology The methodology in simulating the scenario will include the following: • Elevation data obtained from the topography maps of the area will be used instead of the elevation data contained in the database for resolution purposes. • Only borehole 1 and 19 will be used in the simulation as the others fall outside the study area and will have no significant influence. The Cooper-Jacob object will be used in conjunction with borehole 19 to determine a transmissivity value for the study area. The same transmissivity will be assigned to borehole 1. • The area object will calculate the aquifer vulnerability with the parameters supplied. • The availability object will be used to delineate the area in question to calculate the groundwater availability. • Only the flow model will be executed since no pollution object that interacts with the model will be used. The seawater intrusion will be modelled with the seawater intrusion object which makes use of an analytical solution to determine if pollution will occur. The current flow model does not support a saltwater intrusion mechanism, hence the use of an analytical method. • A microbial object will be used to determine the health risk associated with borehole 19 which has a coliform count of greater than 100. The general layout of the scenario is shown in Figure 59. For more detail the whole scenario file is available via the Scenario Wizard in the software. 142 Figure 59: Fish River Lighthouse scenario layout 6.3.4 Results Pumping test data acquired from borehole 19 was used in conjunction with the Cooper- Jacob curve fitting method for determining the transmissivity of the area as shown in Figure 60. Note that the fit was done on the late time drawdown and yielded 7.2 m2/d. 143 Figure 60: Fish River Lighthouse borehole 19 Cooper-Jacob fit The following was determined using the software: • The availability is calculated as 0.009 Mm3/a after deducting the required 0.0438 Mm3/a for the new development. The availability does not include the domestic usage from the lighthouse, which is negligible. • The Aquifer Vulnerability has been calculated as 61.3% with a sensitivity of 3.6% where the groundwater level followed by the recharge is the governing parameters as shown in Figure 61. 144 Figure 61: Fish River Lighthouse aquifer vulnerability sensitivity analysis • After a period of 10 years borehole 1 has a sustainability risk of 15% and borehole 19 has a sustainability risk of 42%. It is evident from the drawdown curves shown in Figure 62, that a boundary condition has been encountered and that the risk will virtually remain unchanged over a long period of time. This implies that both the boreholes are sustainable. Figure 62: Fish River Lighthouse drawdown curves for borehole 1 and 19 145 • The microbial risk is calculated to be a minimum of 0.86 for borehole 19. Microbiological risk refers to the probability of infection thus a person drinking water from borehole 19 has an 86% chance of getting infected. 6.3.5 Conclusions and Recommendations • Borehole 19 is sustainable making it a viable water source for the development and the availability calculation verify that enough water can be sourced from the aquifer. • The aquifer vulnerability is not excessively high, but care should be taken in the development of the area to protect the aquifer at all cost, since it will be the main source of water for the development. • The health risk associated with borehole 19 is a concern, but coliforms can be effectively treated by sterilization and further ‘polishing’ can be achieved by using a low-pressure osmotic plant, which should also remove the extraneous salts and the coliforms. 146 6.4 WASTE SITE: Bloemfontein Suidstort (Geo Pollution Technologies, 2005) 6.4.1 Background The purpose of this case study is to determine the influence of the Suidstort waste site in Bloemfontein on the nearby area called Ferreira and the immediate environment. Ferreira consists of a number of small holdings. 6.4.1.1 Location The area is located on the southern side of Bloemfontein next to the N1 south, to Colesberg. Ferreira is located approximately 7 km from the city centre. The location of the Suidstort waste site and the Ferreira boreholes is shown in Figure 63. Figure 63: Suidstort study area 6.4.1.2 Geology The area is situated on the Beaufort Group of the Karoo Sequence. The regional geology is shown in Figure 64. 147 Figure 64: Suidstort and Ferreira geology map Generally, the following can be observed from the geological map: • The underlying sedimentary rock belongs to the Beaufort Formation. • The Beaufort Formation generally consists of sandstone, siltstone, mudstone and shale from the Adelaide and Tarkastad Subgroup. • The sedimentary rock from the Beaufort Formation is extensively intruded by dolerite sills and dykes throughout the area. • Dolerite dykes are usually associated with preferred groundwater pathways. 6.4.1.3 Hydrology and Geohydrology Results from a hydrocensus completed in the Ferreira area downstream of Suidstort the following is shown in Table 17. 148 Table 17: Ferreira hydrosensus Location Number Elevation Water (mamsl) level EC (mS/m) Usage Longitude Latitude (mbgl) Swart1 26.183420 -29.1954983 1407 13.76 91.9 Irrigation Swart2 26.184010 -29.1955600 - - 89.5 Irrigation Gouws 26.186350 -29.1918583 - - 84.5 Irrigation/Livestock Weyers 26.187908 -29.1882600 1415 13.81 - Irrigation/Livestock Gibson 26.191668 -29.1896200 1421 13.66 109.2 - Poolman 26.187290 -29.1935100 - - 177 Irrigation/drinking Loggenberg 26.192228 -29.1908700 1422 19.36 83.1 Vehicle washing CL1 26.187190 -29.1906000 1415 13.76 96.7 Irrigation CL2 26.187068 -29.1904000 1415 13.76 98.3 Irrigation/Livestock CL3 26.186488 -29.1899400 1416 12.76 96.6 - Ter1 26.181760 -29.1952700 1405 13.26 87.4 Irrigation Ter2 26.182060 -29.1945500 - - 87.2 Irrigation Ter3 26.169763 -29.1965600 - - 76.5 Irrigation Ter4 26.176260 -29.1971083 - - - Irrigation Ter5 26.178500 -29.1983283 - - - Irrigation Ter6 26.178808 -29.1978700 - - - Irrigation Ter7 26.179780 -29.1963400 - - - Irrigation Ter8 26.177050 -29.1959883 1403 18.86 - Irrigation Sadie 26.172590 -29.1950900 1401 16.76 - No current use Beetge1 26.172808 -29.1959000 - - - Irrigation/Drinking Beetge2 26.172110 -29.1972083 - - - Irrigation/Drinking Beetge3 26.172640 -29.1965600 - - - Irrigation/Drinking Beetge4 26.172080 -29.1971400 - - - Irrigation/Drinking Geel1 26.177620 -29.1945400 - - - Irrigation Geel2 26.177460 -29.1944600 - - - - Geel3 26.176638 -29.1948200 - - - - Geel4 26.177170 -29.1949583 - - - - From the hydrocensus it is evident that the water level varies between 12.76 mbgl and 19.36 mbgl in the area. In general the water levels for the study area follow the topography as shown in Figure 65. 149 Figure 65: Suidstort elevations vs. water levels Most of the boreholes in the area are used for the irrigation of personal fruit and vegetable gardens. A few are used for drinking and household purposes as well. Mr. Terblanche, the owner of Ter1 to Ter8 uses his groundwater for lucern irrigation on a large scale (±10ha) and utilises 50000 m3/a. Because of the amount and regularity of abstraction of groundwater an artificial gradient is added to the topographical gradient towards this area. If a preferred pathway existed in the direction of the Terblanche small holdings, pollution would rapidly migrate in that direction. The livestock (mostly poultry and pigs) watering is not of commercial magnitude and would not significantly alter the direction of groundwater flow due to an artificial gradient created by high abstraction rates. The remaining boreholes delivers a total of 6000 m3/a. Beetge and Poolman use the groundwater for domestic purposes. The remaining identified households obtain their potable water from the Mangaung Local Municipality. 150 6.4.2 Hydrochemistry The waste site EC is estimated to be in the order of 250 mS/m using EC readings of down gradient boreholes in close proximity to the waste site. The EC reading of the closest borehole (Gibson) with hydrochemistry information is 109 mS/m. 6.4.3 Assumptions The following assumptions are made regarding the area to be modelled due to incomplete information: • In general the water level follows the topography. • Aquifer Thickness = 30 m • Transmissivity = 10 m2/d • Storativity = 0.001 • Recharge = 3% • Average Rainfall = 580 mm/a • Waste Stream Size = Medium • Waste Type = Domestic • Waste Site Lining = None • The data confidence of all objects = 80% • Effective porosity is 0.05 Typical values for the study area are used where available. 6.4.4 Modelling Methodology The methodology in simulating the scenario will include the following: • Elevation data obtained from the topography maps of the area will be used instead of the elevation data contained in the database for resolution purposes. Tripol together with existing borehole data will be used to generate water levels for the area using Bayesian interpolation. • The waste site will be simulated with the waste site object whose area is used as a constant pollution source to determine the impact on the neighbouring boreholes. • Ter1 to Ter8 will be pumped continuously over a 24 hour period at 0.2 l/s to account for the 50000 m3/a abstracted by these boreholes. The remaining 6000 m3/a will be assigned to Gibson who has the highest abstraction of the remaining boreholes. • A 25 mbgl water strike, groundwater level of 15mbgl and a blow yield of 5 l/s will be assigned to boreholes where the respective information are missing. These 151 parameters are only used for the calculation of sustainability risk and will not affect the results of the pollution risk. The general layout of the scenario is shown Figure 66. For more detail the whole scenario file is available via the Scenario Wizard in the software. Figure 66: Suidstort scenario layout 6.4.5 Results The following results were obtained: • The waste site impact on the area is 53.6% with a sensitivity of 2.3% which is governed by the waste type as shown in Figure 67. Note that the waste site impact is not time dependent. To alter this impact the waste type, waste stream or lining of the waste site must be changed. 152 Figure 67: Suidstort waste site sensitivity analysis • The waste site pollution plume was run for 50 years with the results shown in Figure 68. The pollution risk is 0% due to the fact that the contamination plume never reached any of the boreholes. 153 Figure 68: Suidstort pulme movement after 50 years • On further investigation it came to light that the following boreholes are situated on a dolerite sill with a bedding plane fracture that originates at the waste site (Van Tonder, 2007): o Gouws o Weyers o Gibson o Poolman o Loggenberg o CL1, CL2, CL3 These are the only boreholes that will be affected by the waste site. Just off the sill is calcrete which could be the cause of the salinity values obtained for the other boreholes. For the purpose of this case study only the boreholes that are directly affected by the waste site will be considered in the assessment. 154 The model cannot account for the Darcy velocities in the fracture other than creating suitable hydraulic gradients. To achieve this, virtual boreholes are created around a perimeter delineating the sill. By applying the correct abstraction rates to these boreholes an approximation of the natural plume movement are obtained as shown in Figure 69. Figure 69: Suidstort virtual boreholes Only the boreholes that intersect the sill are now used in the assessment as shown in Figure 70 and the actual and simulated EC values are given in Table 18. 155 Figure 70: Suidstort boreholes intersecting the sill Table 18: Suidstort borehole actual and simulated EC values Actual EC [mS/m] Simulated EC [mS/m} Gouws 84.5 77.3 Weyers 109.2 112.1 Gibson 177 126.3 Poolman 83.1 64.1 Loggenberg 96.7 75.5 CL1 98.3 89.1 CL2 98.3 93.1 CL3 96.6 91 The correlation of the actual and simulated values is shown in Figure 71. 156 Figure 71: Suidstort correlation of the actual and simulated borehole EC values The approximation of the borehole EC values is sufficient for the purpose of determining the pollution risk, since the simulated values are of the same order of magnitude. The pollution risk is 0% for all boreholes with respect to the Drinking Water Guidelines and the Livestock Watering Guidelines (DWAF, 1996). The results of the pollution risk with respect to the Agricultural Use Guidelines (DWAF, 1996) are shown in Figure 72. 157 Figure 72: Suidstort irrigation pollution risk 6.4.6 Conclusions • It is important to perform a proper geotechnical investigation before delineating a waste site due to the effect structures and fault lines can have on contaminant transport. • If a proper conceptual model is not formed, model prediction could be totally wrong. • Although the indicated boreholes are affected by the waste site, the calculated risk values are negligible. 158 6.5 SUSTAINABILITY: De Hoop (Tinghitsi, 2006) 6.5.1 Background A letter of complaint was received by DWAF regional office regarding the drying up of boreholes on the farm Whiteside. The complaint suggested that irrigation on the farms De Hoop and Amandelboom could be the cause of the problem. The purpose of this case study is to investigate the influence of abstraction on the neighbouring farms. 6.5.1.1 Location The farms in question are situated approximately 35 km north east of Boshof in the Free State. The location of De Hoop is shown in Figure 73. ± 4 km ± 4 km Figure 73: De Hoop study area 6.5.1.2 Geology The area is overlain by Quaternary calcrete, red dune sand, surface limestone and shales. These layers are up to a few meters deep. The dominant rock in the area is shale, siltstone and sandstone of the Tierberg formation, Ecca Group (of the Karoo Super Group). Dolerite sills have intruded into the Ecca. 159 6.5.1.3 Physiography The area has flat gently undulating surfaces and hills. The flat lying areas average about 1273 mamsl and the average 1348 mamsl. The hills lie on the farms Uitkyk, Welgevonden, Leeuwkop and Klein Dam. The area is typically grassland with shrubs and sparse vegetation of trees. The water drainage is from the hills in the north east, to the valley below. The drainage system is poorly developed with pans interrupting flow. Since surface run-off is lower at the base of the hill, water tends to accumulate and infiltrate more in low-lying areas. The average rainfall in the area is 432 mm per year. 6.5.1.4 Geohydrology A hydrocensus in the area yielded the results shown in Table 19. Table 19: De Hoop area hydrocensus data Longitude Latitude Name Elevation [mamsl] Groundwater Level [mbgl] 25.195694 -28.331278 WE3 1286 9.13 25.198389 -28.334972 WE4 1278 4.22 25.197889 -28.336139 WE6 1277 2.7 25.209056 -28.326944 WE8 1290 8.25 25.190083 -28.261167 WN1 1327 23.9 25.189917 -28.261361 WN2 1328 23.4 25.191028 -28.262833 WN5 1326 21.5 25.174472 -28.299139 AM2 1297 8.6 25.173556 -28.298694 AM3 1298 7 25.170694 -28.276972 AM10 1317 13.9 25.27375 -28.301639 GT2 1311 8.5 25.279611 -28.307806 GT3 1316 11.13 25.244333 -28.327306 DP5 1291 9.14 25.242750 -28.327556 DP8 1290 9.07 25.243833 -28.329222 DP10 1290 9 25.24375 -28.330083 DP11 1289 9.45 25.245028 -28.329778 DP12 1290 7.95 25.264889 -28.263167 KD6 1367 31.6 25.265444 -28.263528 LP1 1366 31.15 In general the water levels for the study area follow the topography as shown in Figure 74. 160 Figure 74: De Hoop elevations vs. water levels 6.5.1.5 Water Use The authorised water use for the De Hoop area is sown in Table 20. Table 20: De Hoop area water use Farm Name Authorised Volume [m3/a] Area [ha] De Hoop 468000 40 Amandelboom 79500 15 161 6.5.2 Assumptions The following assumptions are made regarding the area to be modelled due to incomplete information: • In general the water level follows the topography. • Aquifer thickness = 45 m • Transmissivity = 20 m2/d • Storativity = 0.01 • The four Whiteside boreholes are assumed to be pumped at 2 l/s each. • No blow yield values were supplied so it is assumed that all blow yield values are three times the abstraction rate. • Due to the fact that no borehole depth or water strike information is available, it is assumed that the all the boreholes have an available drawdown of 15m. • The data confidence of all objects = 80% 6.5.3 Modelling Methodology The methodology in simulating the scenario will include the following: • Elevation data obtained from the topography maps of the area will be used instead of the elevation data contained in the database for resolution purposes. Tripol together with existing borehole data will be used to generate water levels for the area. • De Hoop’s authorised use is 468000 m3/a, which translates to roughly 15 l/s that needs to be distributed over 5 boreholes; hence all the De Hoop boreholes will be pumped at 3 l/s over a 24 hour period. • Amandelboom’s authorised use is 79500 m3/a, which translates to roughly 2.5 l/s that needs to be distributed over 3 boreholes; hence it is assumed that all the Amandelboom boreholes are pumped at 0.85 l/s over a 24 hour period. • The sustainability risk of Whiteside will be determined both with and without the neighbouring boreholes pumping. • Only Amandelboom (AM), DeHoop (DP) and Whiteside (WE) boreholes will be used in the scenario. The general layout of the scenario is shown in Figure 75. For more detail the whole scenario file is available via the Scenario Wizard in the software. 162 Figure 75: De Hoop scenario layout 6.5.4 Results The sustainability risks over time for all boreholes participating in the scenario are shown in Table 21. Table 21: Sustainability risks for Amandelboom, De Hoop and Whiteside 30 Days 60 Days 90 Days 120 Days 150 Days 180 Days 270 Days 360 Days WE3 (2 l/s) 46.8 50 52.4 54.7 57 60.7 100 100 WE4 (2 l/s) 50 55.2 62.1 100 100 100 100 100 WE6 (2 l/s) 49.3 53.7 57.7 67.6 100 100 100 100 WE8 (2 l/s) 45.9 47.5 48.5 49.6 50.4 51.1 53.7 56.4 DP5 (3 l/s) 100 100 100 100 100 100 100 100 DP8 (3 l/s) 100 100 100 100 100 100 100 100 DP10 (3 l/s) 100 100 100 100 100 100 100 100 DP11 (3 l/s) 100 100 100 100 100 100 100 100 DP12 (3 l/s) 100 100 100 100 100 100 100 100 AM2 (0.85 l/s) 40.7 41.9 42.8 43.1 43.7 44 44.6 45.2 AM3 (0.85 l/s) 40.7 41.9 42.8 43.1 43.7 44 44.6 45.2 AM10 (0.85 l/s) 27.7 28.2 28.5 28.7 29 29 29.5 29.8 The following is evident from Table 21: 163 • All the DeHoop boreholes fail within the first 30 days. This could be either due to the fact that the assumptions made regarding missing information was wrong or that wrong information was used in the report. If assumed that all assumptions and information used was correct, the results show that the DeHoop boreholes will fail before they influence the Whiteside boreholes. • After 150 days the first of the Whiteside boreholes also start to fail. • All boreholes not failing show a gradual increase in sustainability risk over time. In all the sustainability risk assessments the water level was the governing parameter for this scenario. An example of one of the sensitivity analyses is shown in Figure 76. Figure 76: De Hoop example of sustainability sensitivity analysis The results of only the Whiteside boreholes pumping are shown in Table 22. Table 22: Sustainability risks for Whiteside 30 Days 60 Days 90 Days 120 Days 150 Days 180 Days 270 Days 360 Days WE3 (2 l/s) 46.8 50 52.4 54.7 57 60.7 100 100 WE4 (2 l/s) 50 55.2 62.1 100 100 100 100 100 WE6 (2 l/s) 49.3 53.7 57.7 67.6 100 100 100 100 WE8 (2 l/s) 45.9 47.5 48.5 49.6 50.4 51.1 53.7 55.7 164 Comparison of Table 21 and Table 22 shows no difference in sustainability risk except for a 0.7% change in risk for WE8 after 1 year. This change is negligible confirming that the neighbouring farms to Whiteside do not influence the sustainability risk. A profile of the water level is taken between Whiteside (WE) and DeHoop (DP) as indicated in Figure 77. Figure 77: De Hoop water level profile position The water level profile associated with Figure 77 is shown in Figure 78. 165 DeHoop Whiteside drawdown drawdown Figure 78: De Hoop water level profile (360 days) The drawdown curves of Amandelboom, DeHoop and Whiteside is shown in Figure 79. Figure 79: De Hoop area drawdown curves 166 Looking at the water levels and drawdown in Figure 78 and Figure 79 respectively, it is not surprising that the DeHoop (DP) boreholes fail early in time since the water level is the governing parameter in the sustainability risk calculations for the scenario. 6.5.5 Conclusions The abstraction of the neighbouring farms to Whiteside does not influence the sustainability risk of Whiteside itself. Over-abstraction will lead to borehole failure of the abstracting borehole before it will influence neighbouring boreholes. The separation distance of boreholes not to be affected is determined by the geohydrological parameters characterising the area. 167 6.6 MINE: Van Tonder Coal Mine (Van Tonder et al, 2006) 6.6.1 Background The Institute for Groundwater Studies conducted a groundwater study and salt balance for the Van Tonder Coal Mine. The primary purpose of this case study is to determine the decant parameters of the mine and generated salt load. In addition, the impact of the associated SO4 pollution will be investigated. 6.6.1.1 Location Opencast mining occurs at the Van Tonder Coal Mine. Surface water drainage of the mine is through the Spook Spruit. The location is shown in Figure 80. Spookspruit Pienaarsdam -2860000 Vaalbankspruit GoedehooVp an Tonder Opencast Coal Mine Mid North -2865000 Witbankdam Harties -2870000 Klipfontein Mid South -2875000 Olifants River Douglasdam Boesmanskransspruit LEGEND Lease Area Mined-Out Areas -2880000 Vlaklaagte Future opencast BMK Underground Boschmanskrans Welverdiend Welv erdiend Underground 30000 35000 40000 45000 50000 55000 Figure 80: Van Tonder opencast study area 6.6.1.2 Geology The geology in the area consists of typical Karoo rocks. The main lithological units comprise soil, weathered sediments, sandstone, mudstone and coal. Soil thicknesses range from 1–3 168 metres. The top 3-10 metres of the sedimentary sequence are usually weathered. The water bearing strata are mainly the sandstones above the coal seams, with the major flow path being on the contact between the sandstone and coal strata. The two geohydrological units of significance are: • The weathered zone. • The coal. Of lesser significance is the occasional occurrence of groundwater within fractures in the sandstone. 6.6.1.3 Geohydrology The information from more than 600 core boreholes shows a very good correlation exists between the surface elevation and the groundwater levels as shown in Figure 81. Figure 81: Van Tonder opencast elevations vs. water level The groundwater levels thus mimic the topographic surface, and natural groundwater flow is mainly in the direction of the topographic slope. 169 6.6.1.4 Assumptions The following assumptions are made regarding the area and mine: • In general the water level follows the topography. • Aquifer Thickness = 50 m • Transmissivity = 3 m2/d • Storativity of Spoils = 0.26 • Storativity = 0.0001 • Sulphate Generation Rate = 7 kg/ha/d • Concentration Ca = 20 mg/l Typical values for the study area are used where available. 6.6.2 Modelling Methodology The methodology in simulating the scenario includes the following: • Elevation data obtained from the topography maps of the area will be used instead of the elevation data contained in the database for resolution purposes. • The mine will be modelled with an opencast mine object. • The river next to the mine will be modelled with a river object that will act as a fixed head boundary. • The transport model will be run for 30 years with a 5 year transport step size to visualise the development of the pollution plume. The general layout of the scenario is shown in Figure 82. For more detail the whole scenario file is available via the Scenario Wizard in the software. 170 Figure 82: Van Tonder opencast scenario layout 6.6.3 Results Figure 83 shows the properties used in the opencast mine object. The groundwater gradient was calculated as 0.04 from the generated groundwater levels. Of importance are the decant rate, decant time and sulphate load as these calculations were the primary objectives of this case study. Note that the calculation of the decant time is dependent on the mine depth which can either represents the mine floor for a dry mine or the current water level in a mine. The calculated concentration is important as this is used as the input concentration of the area pollution object that represents the mine. The specified acceptable and unacceptable concentrations refer to the drinking water guidelines (DWAF, 2006). 171 Figure 83: VanTonder opencast object properties The pollution risk is 100% as expected, taking into consideration the SO4 concentration of 2291 mg/l at the mine, compared to the acceptable and unacceptable values of 200 and 1000 mg/l respectively. A probe was placed next to the Spook Spruit to monitor the generated SO4 as shown in Figure 84. 172 Figure 84: Van Tonder opencast SO4 probe position The results of the SO4 probe over the 30 year simulation period is shown in Figure 85. Figure 85: Van Tonder opencast SO4 probe data 173 In general the pollution plume is relatively contained around the perimeter of the mine, but exhibits high levels of SO4. The following figures show the development of the pollution plume over a 30 year period. Figure 86: Van Tonder opencast pollution plume – Year 1 174 Figure 87: Van Tonder opencast pollution plume - Year 5 Figure 88: Van Tonder opencast pollution plume - Year 10 175 Figure 89: Van Tonder opencast pollution plume - Year 20 Figure 90: Van Tonder opencast pollution plume - Year 30 176 The phenomenon that the pollution plume moves through the river could be contributed to one of the following factors or a combination of both: • Interpolation is used to generate regional water levels due to the fact that measured water level data only exist on discrete points. Interpolation may generate artefacts or conceal detail due to its inherent averaging nature. • Numerical dispersion. 177 7 Conclusions and Recommendations “I think and think for months and years. Ninety-nine times, the conclusion is false. The hundredth time I am right.” Albert Einstein (1921). Groundwater continues to serve as a reliable source of water for a variety of purposes, including industrial and domestic uses and irrigation. In many developing country settings (including South Africa), reliance has turned to dependency and the establishment of perceptions of access and use that are intensely ‘private’ irrespective of the legal status of the groundwater. However, groundwater is inherently susceptible to a wide range of human impacts. Over abstraction, the disposal of human and industrial waste, mining activities and the percolation of pesticides and herbicides have degraded many aquifers beyond an economically viable remediation solution. The largely unseen nature of groundwater has resulted in development initiatives that are unaware of the limits of the resource. This thesis introduces a tool that can assist in the better management of South African groundwater resources. The SAGDT is designed to provide methods and tools to assist groundwater professionals and regulators in making informed decisions concerning groundwater use, management and protection, while taking into account that groundwater forms part of an integrated water resource. The SAGDT is a spatially-based software package, which includes: • A GIS interface to allow a user to import shape files, various CAD formats and geo- referenced images. The GIS interface also provides for spatial queries to assist in the decision-making process. The GIS interface contains default data sets in the form of shape files and grid files depicting various hydrogeological parameters across South Africa. • A risk assessment interface introduces fuzzy logic based risk assessments to assist in decision making by systematically considering all possibilities. The risk assessments relate to the sustainability of a groundwater resource, vulnerability of an aquifer, pollution of a groundwater resource (including seawater intrusion), human health risks associated with a polluted groundwater resource, impacts on aquatic ecosystems and waste site impact on an area. • Third-party software such as shape file editor, an interpolator, a georeference tool, a unit converter and a groundwater dictionary. • A report generator, which automatically generates documentation concerning the results of the risk assessment performed and the input values for the risk assessment. 178 • A scenario wizard is available for the novice to obtain step by step instructions in setting up a scenario. All case studies presented in this document are available in the scenario wizard. • The SAGDT allows problem solving at a regional scale or a local scale, depending on the problem at hand. Case studies are included to demonstrate the application of the SAGDT to real life scenarios. They include: • Vulnerability (Fish River Lighthouse) • Waste Site (Bloemfontein Suidstort) • Sustainability (De Hoop) • Opencast Mine (Van Tonder’s Mine) The SAGDT relies heavily on the expertise of geohydrologists, assumptions and approximations of real world conditions. Together with the heterogeneities present in groundwater systems it is impossible to guarantee the accuracy of the methodologies and the reader must take this into consideration. However as Hurst (1957) stated: It is usually better to do something which is 95% effective immediately, rather than to wait several years to improve the solution by 4%. The following recommendations are made based on the research carried out during this thesis: • This SAGDT has been developed over a period of two and half years and even though it has been tested and calibrated by experts, it is important to note that in order to obtain more accurate results, it must be validated over a period of many years. • Numerous data sets (including shape files) have been included in the SAGDT. As data are improved (eg updates to the GRAII coverages) and more data sets become available, these must be included in the SAGDT to improve the confidence in the results. • Springs and their associated impacts have not been included in the SAGDT. These are important water resources (as a source of water to many towns and ecosystems) and therefore have to be included in the SAGDT. • The ecological risk is limited to a few indicators. This analysis can be developed to include aspects such as various ecosystems (including terrestrial ecosystems). 179 • The health risk analysis (including microbial risks) must be developed further to take into account the migration of the pollutant in the subsurface and the spatial risks related to this migration. • Guidelines on how to make decisions based on the risks calculated in the SAGDT can be developed. A cost-benefit-risk analysis should be included to assist in the decision making process. • Finally the role of monitoring must be stressed. Monitoring forms an important part in the managing of risks and verification of the SAGDT. 180 8 References Afshari, S, Mandle, R, Liu, Q, and Li, S 2004. A Hierarchical Patch Dynamic Approach for Predicting Drawdown At the Radius of a Pumping Well for Large Complex Groundwater Systems, Department of Civil and Environmental Engineering, Michigan State University, USA. ASTM b5611-94 2002. Standard Guide for Conducting a Sensitivity Analysis for a Groundwater Flow Model Application. USA. Bear, J, Beljin, MS and Ross, RR 1992. Fundamentals of Groundwater Modeling. EPA Groundwater Issue EPA/540/5-92/005, Washington DC, USA. Beck, K 1999. Extreme Programming Explained: Embrace Change. Addision-Wesley Professional, USA. Bernstein, P 1996. Against the Gods: The remarkable story of risk. Wiley, New York, USA. Botha, FS 2005. A proposed method to implement a groundwater resource information project (GRIP) in rural communities, South Africa. Unpublished PhD thesis, Institute for Groundwater Studies, University of the Free State, South Africa. Boulding, JR 1995. Practical Handbook of Soil, Vadose zone and Ground-Water Contamination: Assessment, prevention and remediation. Lewis Publishers, USA. Carsel, RF, Mulkey, LA, Lorber, MN and Baskin, LB 1985. The pesticide root zone model (PRZM): A procedure for evaluating pesticide leaching threats to ground water. Ecological Modeling, 30, 49-69. Chaing, W and Kinzelbach, W 1998. Processing Modflow: A Simulation System for Modelling Groundwater Flow and Pollution, Springer, New York, USA. Codeidea 2007. Available on Internet at: http://www.codeidea.com, accessed on 30 August 2007. Collins, L 2007. World of quotes. Available on Internet at http://www.worldofquotes.com, accessed on 30 August 2007. Constitution of South Africa 1996. Government Gazette. Act 108, 1996. Pretoria, South Africa. Dennis, I, Van Tonder, GJ and Riemann, K, 2002. Risk based decision tool for managing and protecting groundwater resources. WRC Report No 969/1/01, Water Research Commission, Pretoria, South Africa. DWAF 1996. South African Water Quality Guidelines. Department of Water Affairs and Forestry, Pretoria, South Africa. DWAF 2004. The National Water Resource Strategy, First Edition. Department of Water Affairs and Forestry, Pretoria, South Africa. 181 DWAF 2005. Groundwater Resource Assessment Phase II. Department of Water Affairs and Forestry, Pretoria, South Africa. DWAF 2007. A Framework for a National Groundwater Strategy. DWAF Report No: PRSA C000/00/4607. Department of Water Affairs and Forestry, Pretoria, South Africa. Environmental Protection Agency 1989. Risk assessment guidance for Superfund, vol 1. Human health manual (part A), Rep EPA/540/1-89/002. Office of Emergency and Remedial Response, Washington DC, USA. Environmental Protection Agency 1994. Estimating radiogenic cancer risks. EPA 402-R-93- 076, Washington DC, USA. Environmental Protection Agency 1994a. Cancer risk coefficient for environmental exposure to radionuclides. Federal Guidance Report no 13. EPA 402-R-99-001. Office of Radiation and Indoor Air, Washington DC, USA. Environmental Protection Agency 2000. Drinking water standards and health advisories. EPA 822-B-00-001. Office of Water. US Environmental Protection Agency, Washington DC, USA. Environmental Protection Agency 2001. Well Head Protection Areas. Available on Internet at: http://www.wrds.uwyo.edu/wrds/deq/whp/whpsect2.html, accessed on 30 August 2007. Environmental Systems Research Institute 2007. Available on Internet at: http://www.esri.com, accessed on 30 August 2007. FAO Land and Water Development Division, the United Nations Department of Economic and Social Affairs, the International Atomic Energy Agency, and the United Nations Educational, Scientific and Cultural Organization 2003. Groundwater Management: The search for practical approaches. Food and Agriculture organization of the United Nations, Rome, Italy. Fenton, F and Martin N 2006. Measuring your Risks, Available on Internet at http://www.agenarisk.com, accessed on 30 August 2007. Foster, S, Lawrence, A and Morris, B 1998. Groundwater in Urban Development: Assessing Management Need and Formulating Policy Strategies. World Bank Technical Papers, The World Bank, Washinghton DC, USA. Foster, S, Hirata, R, Games, D, D’Elias, M and Paris, M 2002. Groundwater quality protection, a guide for water utilities, municipal authorities and environment agencies. World Bank Technical Papers, The World Bank, Washington DC, USA. Freeze, RA and Cherry, JA 1979. Groundwater. Prentice-Hall, Englewood Cliffs, New Jersey, USA. 182 Fuzzy Logic Fundamentals, 2007. Chapter 3, pg 61-103. Available on Internet at: http://www.informit.com/content/images/0135705991/samplechapter/0135705991.pdf , accessed on 30 August 2007. Geo Pollution Technologies 2005. Ferreira Borehole Census. Geo Pollution Technologies, Pretoria, South Africa. Glieck, P 2003. Speech at Water for People and the Environment Conference, Available on Internet at: http://mysite.verizon.net/respgewl/id12.html, accessed on 30 August 2007. GRDM Manual 2005. Groundwater Resource Directed Measures Manual. Water Research Commission Project No. K5/1427. Water Research Commission, Pretoria, South Africa. Groundwater Management 2007. Facts concerning groundwater. Available on Internet at: http://www.groundwatermanagement.org, accessed on 30 August 2007. Henry, D 2007. World of quotes. Available on Internet at: http://www.worldofquotes.com, accessed on 30 August 2007. Hill, M 1990. Preconditioned Conjufgate-Gradient 2 (PCG2), A Computer Program For Solving Groundwater Flow Equations, USGS, Denver, Colorado, USA. Hurst, HE 1957. The Nile: A general account of the river and the utilization of its water. Constable and Company Ltd., London. Klir, GJ and Yuan, B 1995. Fuzzy Sets and Fuzzy Logic: Theory and Applications. Prentice- Hall PTR, Upper Saddle River, New Jersey, USA. Kruseman, GP and De Ridder, NA 1991. Analysis and Evaluation of Pumping Test Data, second edition. International Institute for Land Reclamation and Improvement, Wageningen, The Netherlands. Mamdani, EH and Gaines, BR 1981. Fuzzy Reasoning and it’s Applications. Academic Press. New York, USA. Mandle, RJ 2002. Groundwater Modeling Guidance. Groundwater Modeling Program, Michigan Department of Environmental Quality, Michigan, USA. Matlab 2002. The Language of Technical Computing: Fuzzy Logic Toolbox. Version 6.5 Help File. The Mathworks, Inc, Boston, USA. McNeill, FM and Thro, E 1994. Fuzzy Logic – A Practical Approach. Academic Press Limited. 24-28 Oval Road, London. Minister of Water Affairs and Forestry (Hendricks LB) 2007. Speech at Launch of the National Water Conservation and Water Demand Indaba. Available on Internet at: http://www.dwaf.gov.za/Communications/MinisterSpeeches/2007, accessed on 30 August 2007. 183 Minister of Water Affairs and Forestry (Sonjica BP) 2006. Speech at Water Week Celebrations. Available on Internet at: http://www.dwaf.gov.za/Communications/MinisterSpeeches/2006, accessed on 30 August 2007. Misstear, BDR 2001. The values of simple equilibrium approximations. Hydrogeology Journal, vol 9, no 2, p 125 – 126. Mouton, E 2006. Groundwater Sensitivity Analysis for the Proposed Carpe Diem Estate. WSM Leshika, Port Alfred, South Africa. National Water Act 1998. Government Gazette, 19182. Act 36, 26 August 1998. Pretoria, South Africa. Object Management Group 2007. Unified Modelling Language Specification. Available on Internet at: www.omg.org, accessed on 30 August 2007. Ozbek, MM and Pinder, GF 2005. Non-probabilistic uncertainty in subsurface hydrology and it’s applications: An overview. Department of Civil and Environmental Engineering, University of Vermont, Burlington, USA. Palisade Corporation 2004. Guide to using @ Risk: Risk Analysis and Simulation Add-In for Microsoft® Excel Version 4.5. 31, Newfield, New York, USA. Peaceman, DW, 1983. Interpretation of Well-Block Pressure in Numerical Reservoir Simulation with Nonsquare Grid Blocks and Anisotropic Permeability. Paper SPE 10528. Peyton, Z and Peebles, JR 1993, Probability, Random Variables and Random Signal Principles. McGraw-Hill, Inc., Hightstown, New York, USA. Roberts, FS 1979. Measurement Theory with Applications to Decision Making, Utility and the Social Sciences. Addison Wesley, Hoboken, New Jersey, USA. Rose, JB and Gerba, CP 1991. Use of risk assessment for development of microbial standards. Water Science Technology, vol 24, no 2, p 29 – 34. Schank, RC and Childers, PG 1984. The Cognitive Computer: on Language, Learning and Artificial Intelligence. Pearson Addison-Wesley, New York, USA. Shepard, D 1968. A two dimensional interpolation function for irregularly spaced data. Proceedings 23rd. ACM National Conference. Schwab, M and Genthe, B 1998. Environmental Health Risk Assessment: A primer for South Africa. Environmentek, CSIR, PO Box 320, Stellenbosch, South Africa. Siler, W and Buckley, JJ 2005. Fuzzy Expert Systems and Fuzzy Reasoning. John Wiley & Sons, Inc., Hoboken, New Jersey, USA. Solojentsev, ED 2005. Scenario Logic and Probabilistic Management of Risk in Business and Engineering. Springer Science + Business Media, Inc, USA. 184 Spitz, K and Moreno, J 1996. A practical guide to groundwater and solute transport modelling. John Wiley and Sons, Inc. USA. Tinghitsi, DC 2006. Groundwater use investigation in the De Hoop area Boshof District C91C, Technical Report GH 4029, Department of Water Affairs and Forestry, Kimberley, South Africa. UNESCO, 2000. Groundwater and society: resources, tensions and opportunities. New York, United Nations Department of Social and Economic Affairs, Institute for Social and Environmental Transition. 170 pp. University of Florida, 2007. Decision making process: A career planning course handout. University of Florida Career Resource Center. Available on Internet at: http://www.crc.ufl.edu, accessed on 30 August 2007. Usher, BH 2003. The Development and Evaluation of Hydrogeochemical Prediction Techniques in South African Coal Mines. Unpublished PhD Thesis, Institute for Groundwater Studies, University of the Free State, South Africa. Van der Werf, HMG and Zimmer, C 1997. An indicator of pesticide environmental impact based on a fuzzy expert system. INRA, Station d’Agronomie, 28 rue de Herrlisheim, BP 507, 68021, Colmar, France. Available on Internet at: http://www.pmac.net/benbfuz1.htm, accessed on 30 August 2007. Van Tonder, GJ, Botha, JF and Muller, JL 1986. The problem of sea-water intrusion near Lake Mzingazi at Richards Bay, Water SA, Vol 12. Van Tonder, GJ and Xu, Y 2001. A Guide for the estimation of groundwater recharge in South Africa. Institute for Groundwater Studies, University of the Free State, South Africa. Van Tonder, GJ, Vermeulen, D and Lukas, E 2006. Middelburg Mines Groundwater Assessment, Report No 08/MC/GvT, Institute for Groundwater Studies, University of the Free State, South Africa. Van Tonder, GJ 2007. Personal communication. Institute for Groundwater Studies, University of the Free State, South Africa. Veiga, MM and Meech, JA 1994. Paper: Application of Fuzzy Logic to Environmental Risk Assessment. Department of Mining and Mineral Process Engineeing, University of British Columbia, Vancouver, Canada. Vivier, JJP, Van Tonder, GJ and Botha, JF 1995. The use of slug tests to predict borehole yields: correlation between the recession time of slug tests and borehole yields. In proceedings: Groundwater ’95 – Groundwater recharge and rural water supply, Volkswagen Conference Centre, Midrand, South Africa. Water Services Act 1997. Government Gazette, 18522. Act 108, 19 December 1997. Cape Town, South Africa. 185 Water Research Commission, 2004. Identification and prioritisation of groundwater contaminants and sources in South Africa’s urban catchments. WRC Report No. K5/1326, Water Research Commission, Pretoria. Xu, Y and Beekman, HE 2003. Groundwater recharge estimation in Southern Africa. UNESCO IHP Series No. 64. UNESCO, Cape Town, South Africa. Zadeh, LA 1992. The Calculus of Fuzzy If/Then Rules. AI Expert, p23 - 27. 186 Appendix A: Use Case Diagrams 187 9 Appendix B: Logical View Diagram 188 Appendix C: Fuzzy Logic Rules and Member Functions The degree of membership (DOM) functions used in the SAGDT is shown below: 189 where I = Input value F = Favourable input limit U = Unfavourable input limit The linear type (DOM = I) is used for discrete input types from a dropdown list for example soils. Note that the SAGDT assumes that the Favourable and Unfavourable curves are inverses of each other and hence only the favourable equation needs to be specified. 190 Aquifer Vulnerability [%] INPUT KEY=I1;NAME=GroundwaterLevel;F=30;U=0;DOM=1-(0.5*(COS(((I-F)*3.1428/ABS(F-U))-3.1428)+1)) KEY=I2;NAME=Recharge;F=0;U=100;DOM=0.5*(COS(((I-U)*3.1428/ABS(F-U))-3.1428)+1) KEY=I3;NAME=Slope;F=18;U=0;DOM=1-(0.5*(COS(((I-F)*3.1428/ABS(F-U))-3.1428)+1)) KEY=I4;NAME=SoilMedia;F=1;U=0;DOM=I KEY=I5;NAME=AquiferMedia;F=1;U=0;DOM=I KEY=I6;NAME=VadoseZone;F=1;U=0;DOM=I RULES KEY=R1;I1=F;I2=F;I3=F;I4=F;I5=F;I6=F;W=0.0 KEY=R2;I1=F;I2=F;I3=F;I4=F;I5=F;I6=U;W=0.25 KEY=R3;I1=F;I2=F;I3=F;I4=F;I5=U;I6=F;W=0.1 KEY=R4;I1=F;I2=F;I3=F;I4=F;I5=U;I6=U;W=0.35 KEY=R5;I1=F;I2=F;I3=F;I4=U;I5=F;I6=F;W=0.05 KEY=R6;I1=F;I2=F;I3=F;I4=U;I5=F;I6=U;W=0.3 KEY=R7;I1=F;I2=F;I3=F;I4=U;I5=U;I6=F;W=0.15 KEY=R8;I1=F;I2=F;I3=U;I4=U;I5=U;I6=U;W=0.4 KEY=R9;I1=F;I2=F;I3=U;I4=F;I5=F;I6=F;W=0.15 KEY=R10;I1=F;I2=F;I3=U;I4=F;I5=F;I6=U;W=0.4 KEY=R11;I1=F;I2=F;I3=U;I4=F;I5=U;I6=F;W=0.25 KEY=R12;I1=F;I2=F;I3=U;I4=F;I5=U;I6=U;W=0.5 KEY=R13;I1=F;I2=F;I3=U;I4=U;I5=F;I6=F;W=0.2 KEY=R14;I1=F;I2=F;I3=U;I4=U;I5=F;I6=U;W=0.45 KEY=R15;I1=F;I2=F;I3=U;I4=U;I5=U;I6=F;W=0.3 KEY=R16;I1=F;I2=F;I3=U;I4=U;I5=U;I6=U;W=0.55 KEY=R17;I1=F;I2=U;I3=F;I4=F;I5=F;I6=F;W=0.2 KEY=R18;I1=F;I2=U;I3=F;I4=F;I5=F;I6=U;W=0.45 KEY=R19;I1=F;I2=U;I3=F;I4=F;I5=U;I6=F;W=0.3 KEY=R20;I1=F;I2=U;I3=F;I4=F;I5=U;I6=U;W=0.55 KEY=R21;I1=F;I2=U;I3=F;I4=U;I5=F;I6=F;W=0.25 KEY=R22;I1=F;I2=U;I3=F;I4=U;I5=F;I6=U;W=0.5 KEY=R23;I1=F;I2=U;I3=F;I4=U;I5=U;I6=F;W=0.35 KEY=R24;I1=F;I2=U;I3=F;I4=U;I5=U;I6=U;W=0.6 KEY=R25;I1=F;I2=U;I3=U;I4=F;I5=F;I6=F;W=0.35 KEY=R26;I1=F;I2=U;I3=U;I4=F;I5=F;I6=U;W=0.6 KEY=R27;I1=F;I2=U;I3=U;I4=F;I5=U;I6=F;W=0.45 KEY=R28;I1=F;I2=U;I3=U;I4=F;I5=U;I6=U;W=0.7 KEY=R29;I1=F;I2=U;I3=U;I4=U;I5=F;I6=F;W=0.4 KEY=R30;I1=F;I2=U;I3=U;I4=U;I5=F;I6=U;W=0.65 KEY=R31;I1=F;I2=U;I3=U;I4=U;I5=U;I6=F;W=0.5 KEY=R32;I1=F;I2=U;I3=U;I4=U;I5=U;I6=U;W=0.75 KEY=R33;I1=U;I2=F;I3=F;I4=F;I5=F;I6=F;W=0.25 KEY=R34;I1=U;I2=F;I3=F;I4=F;I5=F;I6=U;W=0.5 KEY=R35;I1=U;I2=F;I3=F;I4=F;I5=U;I6=F;W=0.35 KEY=R36;I1=U;I2=F;I3=F;I4=F;I5=U;I6=U;W=0.6 KEY=R37;I1=U;I2=F;I3=F;I4=U;I5=F;I6=F;W=0.3 KEY=R38;I1=U;I2=F;I3=F;I4=U;I5=F;I6=U;W=0.55 KEY=R39;I1=U;I2=F;I3=F;I4=U;I5=U;I6=F;W=0.4 KEY=R40;I1=U;I2=F;I3=F;I4=U;I5=U;I6=U;W=0.65 KEY=R41;I1=U;I2=F;I3=U;I4=F;I5=F;I6=F;W=0.4 KEY=R42;I1=U;I2=F;I3=U;I4=F;I5=F;I6=U;W=0.65 KEY=R43;I1=U;I2=F;I3=U;I4=F;I5=U;I6=F;W=0.5 KEY=R44;I1=U;I2=F;I3=U;I4=F;I5=U;I6=U;W=0.75 KEY=R45;I1=U;I2=F;I3=U;I4=U;I5=F;I6=F;W=0.45 KEY=R46;I1=U;I2=F;I3=U;I4=U;I5=F;I6=U;W=0.7 KEY=R47;I1=U;I2=F;I3=U;I4=U;I5=U;I6=F;W=0.55 KEY=R48;I1=U;I2=F;I3=U;I4=U;I5=U;I6=U;W=0.8 KEY=R49;I1=U;I2=U;I3=F;I4=F;I5=F;I6=F;W=0.45 KEY=R50;I1=U;I2=U;I3=F;I4=F;I5=F;I6=U;W=0.7 KEY=R51;I1=U;I2=U;I3=F;I4=F;I5=U;I6=F;W=0.55 191 KEY=R52;I1=U;I2=U;I3=F;I4=F;I5=U;I6=U;W=0.8 KEY=R53;I1=U;I2=U;I3=F;I4=U;I5=F;I6=F;W=0.5 KEY=R54;I1=U;I2=U;I3=F;I4=U;I5=F;I6=U;W=0.75 KEY=R55;I1=U;I2=U;I3=F;I4=U;I5=U;I6=F;W=0.6 KEY=R56;I1=U;I2=U;I3=F;I4=U;I5=U;I6=U;W=0.85 KEY=R57;I1=U;I2=U;I3=U;I4=F;I5=F;I6=F;W=0.6 KEY=R58;I1=U;I2=U;I3=U;I4=F;I5=F;I6=U;W=0.85 KEY=R59;I1=U;I2=U;I3=U;I4=F;I5=U;I6=F;W=0.7 KEY=R60;I1=U;I2=U;I3=U;I4=F;I5=U;I6=U;W=0.95 KEY=R61;I1=U;I2=U;I3=U;I4=U;I5=F;I6=F;W=0.65 KEY=R62;I1=U;I2=U;I3=U;I4=U;I5=F;I6=U;W=0.9 KEY=R63;I1=U;I2=U;I3=U;I4=U;I5=U;I6=F;W=0.75 KEY=R64;I1=U;I2=U;I3=U;I4=U;I5=U;I6=U;W=1.0 Sustainability Risk [%] INPUT KEY=I1;NAME=PercentageRecharge;F=35;U=1;DOM=1-(0.5*(COS(((I-F)*3.1428/ABS(F-U))-3.1428)+1)) KEY=I2;NAME=WaterLevel;F=StaticWaterLevel;U=WaterStrike;DOM=((I-U)/(F-U)) ^ 0.25 KEY=I3;NAME=Abstraction;F=FavourableQ;U=UnfavourableQ;DOM=1-(0.5*(COS(((I-F)*3.1428/ABS(F-U))-3.1428)+1)) KEY=I4;NAME=S;F=0.15;U=0.0001;DOM=1-(0.5*(COS(((I-F)*3.1428/ABS(F-U))-3.1428)+1)) KEY=I5;NAME=IntrusionDistance;F=0;U=DistancefromSea;DOM=0.5*(COS(((I-U)*3.1428/ABS(F-U))-3.1428)+1) RULES KEY=R1;I1=F;I2=F;I3=F;I4=F;I5=F;W=0.0 KEY=R2;I1=F;I2=F;I3=F;I4=F;I5=U;W=1.0 KEY=R3;I1=F;I2=F;I3=F;I4=U;I5=F;W=0.15 KEY=R4;I1=F;I2=F;I3=F;I4=U;I5=U;W=1.0 KEY=R5;I1=F;I2=F;I3=U;I4=F;I5=F;W=0.05 KEY=R6;I1=F;I2=F;I3=U;I4=F;I5=U;W=1.0 KEY=R7;I1=F;I2=F;I3=U;I4=U;I5=F;W=0.1 KEY=R8;I1=F;I2=F;I3=U;I4=U;I5=U;W=1.0 KEY=R9;I1=F;I2=U;I3=F;I4=F;I5=F;W=1.0 KEY=R10;I1=F;I2=U;I3=F;I4=F;I5=U;W=1.0 KEY=R11;I1=F;I2=U;I3=F;I4=U;I5=F;W=1.0 KEY=R12;I1=F;I2=U;I3=F;I4=U;I5=U;W=1.0 KEY=R13;I1=F;I2=U;I3=U;I4=F;I5=F;W=1.0 KEY=R14;I1=F;I2=U;I3=U;I4=F;I5=U;W=1.0 KEY=R15;I1=F;I2=U;I3=U;I4=U;I5=F;W=1.0 KEY=R16;I1=F;I2=U;I3=U;I4=U;I5=U;W=1.0 KEY=R17;I1=U;I2=F;I3=F;I4=F;I5=F;W=0.1 KEY=R18;I1=U;I2=F;I3=F;I4=F;I5=U;W=1.0 KEY=R19;I1=U;I2=F;I3=F;I4=U;I5=F;W=0.1 KEY=R20;I1=U;I2=F;I3=F;I4=U;I5=U;W=1.0 KEY=R21;I1=U;I2=F;I3=U;I4=F;I5=F;W=0.1 KEY=R22;I1=U;I2=F;I3=U;I4=F;I5=U;W=1.0 KEY=R23;I1=U;I2=F;I3=U;I4=U;I5=F;W=0.15 KEY=R24;I1=U;I2=F;I3=U;I4=U;I5=U;W=1.0 KEY=R25;I1=U;I2=U;I3=F;I4=F;I5=F;W=1.0 KEY=R26;I1=U;I2=U;I3=F;I4=F;I5=U;W=1.0 KEY=R27;I1=U;I2=U;I3=F;I4=U;I5=F;W=1.0 KEY=R28;I1=U;I2=U;I3=F;I4=U;I5=U;W=1.0 KEY=R29;I1=U;I2=U;I3=U;I4=F;I5=F;W=1.0 KEY=R30;I1=U;I2=U;I3=U;I4=F;I5=U;W=1.0 KEY=R31;I1=U;I2=U;I3=U;I4=U;I5=F;W=1.0 KEY=R32;I1=U;I2=U;I3=U;I4=U;I5=U;W=1.0 192 Pollution Risk [%] INPUT KEY=I1;NAME=Concentration;F=Acceptable;U=Unacceptable;DOM=0.5*(COS(((I-U)*3.1428/ABS(F-U))-3.1428)+1) RULES KEY=R1;I1=F;W=0.0 KEY=R2;I1=U;W=1.0 Ecological Risk [%] INPUT KEY=I1;NAME=RootExposure;F=0.5;U=2;DOM=0.5*(COS(((I-U)*3.1428/ABS(F-U))-3.1428)+1) KEY=I2;NAME=Dependance;F=1;U=0;DOM=I KEY=I3;NAME=SystemSensitivity;F=1;U=0;DOM=I KEY=I4;NAME=SystemType;F=1;U=0;DOM=I RULES KEY=R1;I1=F;I2=F;I3=F;I4=F;W=0.0 KEY=R2;I1=F;I2=F;I3=F;I4=U;W=0.25 KEY=R3;I1=F;I2=F;I3=U;I4=F;W=0.25 KEY=R4;I1=F;I2=F;I3=U;I4=U;W=0.5 KEY=R5;I1=F;I2=U;I3=F;I4=F;W=0.25 KEY=R6;I1=F;I2=U;I3=F;I4=U;W=0.5 KEY=R7;I1=F;I2=U;I3=U;I4=F;W=0.5 KEY=R8;I1=F;I2=U;I3=U;I4=U;W=0.75 KEY=R9;I1=U;I2=F;I3=F;I4=F;W=0.25 KEY=R10;I1=U;I2=F;I3=F;I4=U;W=0.5 KEY=R11;I1=U;I2=F;I3=U;I4=F;W=0.5 KEY=R12;I1=U;I2=F;I3=U;I4=U;W=0.75 KEY=R13;I1=U;I2=U;I3=F;I4=F;W=0.75 KEY=R14;I1=U;I2=U;I3=F;I4=U;W=0.75 KEY=R15;I1=U;I2=U;I3=U;I4=F;W=0.75 KEY=R16;I1=U;I2=U;I3=U;I4=U;W=1.0 Waste Site Impact [%] INPUT KEY=I1;NAME=Size;F=0.5;U=50;DOM=0.5*(COS(((I-U)*3.1428/ABS(F-U))-3.1428)+1) KEY=I2;NAME=WasteStream;F=1;U=0;DOM=I KEY=I3;NAME=WasteType;F=1;U=0;DOM=I KEY=I4;NAME=Lining;F=1;U=0;DOM=I RULES KEY=R1;I1=F;I2=F;I3=F;I4=F;W=0.0 KEY=R2;I1=F;I2=F;I3=F;I4=U;W=0.25 KEY=R3;I1=F;I2=F;I3=U;I4=F;W=0.25 KEY=R4;I1=F;I2=F;I3=U;I4=U;W=0.5 KEY=R5;I1=F;I2=U;I3=F;I4=F;W=0.25 KEY=R6;I1=F;I2=U;I3=F;I4=U;W=0.5 KEY=R7;I1=F;I2=U;I3=U;I4=F;W=0.5 KEY=R8;I1=F;I2=U;I3=U;I4=U;W=0.75 KEY=R9;I1=U;I2=F;I3=F;I4=F;W=0.25 KEY=R10;I1=U;I2=F;I3=F;I4=U;W=0.5 KEY=R11;I1=U;I2=F;I3=U;I4=F;W=0.5 KEY=R12;I1=U;I2=F;I3=U;I4=U;W=0.75 KEY=R13;I1=U;I2=U;I3=F;I4=F;W=0.75 KEY=R14;I1=U;I2=U;I3=F;I4=U;W=0.75 KEY=R15;I1=U;I2=U;I3=U;I4=F;W=0.75 KEY=R16;I1=U;I2=U;I3=U;I4=U;W=1.0 193 Toxicity Risk INPUT KEY=I1;NAME=ToxicRisk Carcinogenic Risk INPUT KEY=I1;NAME=CarcinogenicRisk Radiogenic Risk INPUT KEY=I1;NAME=RadiogenicRisk Microbial Risk INPUT KEY=I1;NAME=MicrobialRisk 194 Summary Water in South Africa is becoming a scarce and important resource and therefore has to be managed and protected in order to ensure sustainability, equity and efficiency. The SAGDT is designed to provide methods and tools to assist groundwater professionals and regulators in making informed decisions concerning groundwater use, management and protection, while taking into account that groundwater forms part of an integrated water resource. The SAGDT is spatially-based software, which includes: • A GIS interface to allow a user to import shape files, various CAD formats and geo- referenced images. The GIS interface also provides for spatial queries to assist in the decision-making process. The GIS interface contains default data sets in the form of shape files and grid files depicting various hydrogeological parameters across South Africa. • A risk assessment interface introduces fuzzy logic based risk assessments to assist in decision making by systematically considering all possibilities. Included risk assessments relate to the sustainability of a groundwater resource, vulnerability of an aquifer, pollution of a groundwater resource (including seawater intrusion), human health risks associated with a polluted groundwater resource, impacts of changes in groundwater on aquatic ecosystems and waste site impact on an area. • Third-party software such as a shape file editor, an interpolator, a georeference tool, a unit converter and a groundwater dictionary. • A report generator, which automatically generates documentation concerning the results of the risk assessment performed and the input values for the risk assessment. • A scenario wizard for the novice to obtain step by step instructions in setting up a scenario. All case studies presented in this thesis is available in the scenario wizard. • The SAGDT allows problem solving at a regional scale or a local scale, depending on the problem at hand. This thesis discusses the origin, research, development and implementation of the SAGDT. Case studies are included to demonstrate the working of the SAGDT. They include: • Vunerability (Fish River Lighthouse) • Waste Site (Bloemfontein Suidstort) • Sustainability (De Hoop) • Mine (Van Tonder Opencast) 195 The SAGDT relies heavily on the expertise of hydrogeologists, assumptions and approximations of real world conditions. Together with the heterogeneities present in groundwater systems it is impossible to guarantee the accuracy of the methodologies and this must be taken into consideration. 196 Opsomming Water word ‘n skaars en belangrike bron in Suid Afrika en moet om die rede goed bestuur en bewaar word om volhoubaarheid, gelykheid en effektiwiteit te verseker. Die SAGDT is ontwerp en ontwikkel om metodes te bied om kundiges en kontroleurs van grondwater te ondersteun om ingeligte besluite met betrekking tot grondwater gebruik, bestuur en bewaring te neem, met die feit in gedagte dat grondwater ‘n integrale deel van die land se waterbronne is. Die SAGDT is ruimtelik gebasseerde sagteware wat insluit: • ‘n GIS-koppeling om die gebruiker in staat te stel om ‘n geografiese vektorlêer, verskeie CAD formate en geo-verwysingsbeelde in te voer. Die GIS-koppeling maak ook voorsiening vir ruimtelike navrae ter ondersteuning van die besluitnemingsproses. Die GIS-koppeling bevat vektor- en roosterlêers met verskeie hidrogeologiese veranderlikes van oral in Suid Afrika. • ‘n Risiko-assesseringskoppeling wat “fuzzy logic” risiko-assesserings invoer om behulpsaam te wees met besluitneming deur sistematiese beskouing van alle moontlikhede. Die ingeslote risiko-assesserings het betrekking op die volhoubaarheid van ‘n grondwaterbron, die kwesbaarheid van ‘n grondwaterdraer, besoedeling van ‘n grondwaterbron (insluitend die indringing van seewater), menslike gesondheidsrisiko geassosieer met besoedelde grondwaterbronne, impak van veranderinge in grondwater op die akwatiese ekosisteme en die impak van afval stortingsterreine op ‘n omgewing. • Derde party sagteware soos ‘n vektorlêerverwerker, ‘n interpolator, ’n geo- verwysingsverwerker, ‘n eenheidsomskakelingsverwerker en ‘n grondwater biblioteek. • ‘n Verslag generator wat outomaties dokumentasie mbt die resultate van risiko- assessering verskaf en die invoer van risiko-assesseringswaardes. • ‘n Senario skepper wat vir die nuweling operateur stap vir stap instuksies verskaf vir die opstel van ‘n senario. Al die gevalle studies in die proefskrif is beskikbaar in die senario skepper. • Die SAGDT kan probleemoplossing op ‘n streeks- en ook op ‘n plaaslike vlak hanteer, afhangend van die tersaaklike probleem. Hierdie tesis bespreek die oorsprong, navorsing, ontwikkeling en implementering van die SAGDT. Gevallestudies om die die werking van die SAGDT te illustreer is ingesluit nl: 197 • Kwesbaarheid (Visrivier Ligtoring) • Afvalstortingsterrein (Bloemfontein-Suidstort) • Volhoubaarheid (De Hoop) • Myn (Van Tonder Oopgroefmyn) Die SAGDT leun swaar op die kundigheid van geohidroloë asook aannames en benaderings van egte wêreld toestande. Tesame met heterogene teenwoordigheid in grondwatersisteme is dit onmoontlik om akkuraatheid van metodologie te waarborg. 198