ii/ United States Environmental Protection Agency Environmental Research Laboratory Athens GA 30613 Research and Development EPA/600/S3-88/013 Sept. 1988 Project Summary CORMIX1, An Expert System for Mixing Zone Analysis of Toxic and Conventional, Single Port Aquatic Discharges R. L. Doneker and G. H. Jirka CORMIX1 predicts the dilution and tra- jectory of a single buoyant discharge in- to an unstratified ambient aquatic en- vironment with or without crossflow. CORMIX1 uses knowledge and inference rules obtained from hydrodynamic ex- perts to classify and predict buoyant jet mixing. CORMIX1 gathers the necessary data, checks for data consistency, assembles and executes the appropriate hydrodynamic simulation models, inter- prets the results of the simulation in terms of the legal requirements (in- cluding toxic discharge criteria), and suggests design alternatives to improve dilution characteristics. This Project Summary was developed by EPA's Environmental Research Laboratory, Athens, GA, to announce key findings of the research project that is fully documented in a separate report of the same title (see Project Report order- ing information at back). Introduction A mixing zone is defined as an "allocated impact zone" where numeric water quality criteria can be exceeded as long as acute- ly toxic conditions are prevented. Water quality regulations can prohibit lethal con- centrations or require that a concentration known as the criterion maximum concen- tration (CMC) be met within a short distance from the outfall. The CMC is a concentra- tion that prevents lethality or acute effects in tested species. If dilution of the toxic discharge in the ambient environment is allowed, this requirement (which is defin- ed as a toxic dilution zone - TDZ), is more restrictive than the legal mixing zone for conventional and non-conventional pollutants. Any discharge into a navigable water- course is regulated by a National Pollution Discharge Elimination System (NPDES) permit. The permit is designed to ensure that the discharge meets all applicable water quality standards. Implementation of the mixing zone policy in the NPDES per- mitting process requires that the applicants and regulators predict the initial dilution of the discharge and the charactistics of the mixing zone. If the discharge is toxic, the CMC value must be determined for the discharge and special requirements for a TDZ must be met within the mixing zone. Given the large number of possible ambient environments, discharge configurations, and mixing zone definitions, the analyst needs considerable training and ex- perience to conduct accurate and reliable effluent mixing analyses. The most direct way of determining pollu- tant concentration downstream is by physical measurement. Non-polluting tracers also can be injected to give indica- tions of effluent dilution. Such field studies require considerable time and effort, and field personnel need specialized training to perform studies reliably. Field studies are in many cases impractical and expensive. Because of the complexity of the physical mixing process, permit writers are increas- ingly relying on mathematical models to ------- analyze the fate and transport of pollutants. The difficulty with many present models is that they tend to become specialized and give accurate results only for a particular type of outfall. In determining the characteristics of the mixing zone, the analyst may choose from a wide variety of predictive models. The models range in complexity from simple analytical formulae to highly intricate numerical solutions to differential equa- tions. Although the USEPA has prepared assessment manuals and actually endors- ed certain models in specific situations, the average user has little reliable guidance on which model is appropriate for a particular situation. Often, unnecessarily complicated models are employed, creating a needless burden for both regulators and dischargers. Because of these difficulties, a large in- vestment in time is required for the analyst to become familiar and proficient with the use of at least one model, or more likely, a group of models. The analyst must become highly skilled or an "expert" in the use and interpretation of a number of simulation models. Such expertise in model use requires expensive training and is rare. This is the reason for the development of expert system tools for the analyst. In essence, expert systems mimic the way an expert or highly experienced per- son would solve a problem. An expert system is a structured computer program that uses knowledge and inference pro- cedures obtained from experts for solving a particular type or class of problem call- ed a "domain." This knowledge is encod- ed into a "knowledge base" that enables inexperienced personnel to solve complex problems by using the same basic reason- ing processes an expert would apply. The development of an expert system for mixing zone analysis promises significant advantages when compared to existing conventional simulation techniques for water pollution control and management. This type of expert system assures the pro- per model choice for a given physical situa- tion. It allows a flexible application of design strategies for a given point source, screen- ing of alternatives, and if necessary, swit- ching to different predictive models, thus avoiding rigid adherence to a single model. It assures that the chosen model is applied methodically without skipping essential elements. It also provides a teaching en- vironment whereby the initially inexperienc- ed analyst can gain insight into and understanding about initial mixing pro- cesses. Expert systems are a technology that has enormous potential for solving pro- blems in environmental science. The problem addressed was to develop a tool for the analysis and design of submerged, single port, continuous buoyant discharges into a non-stratified aqueous environment. The expert system is labeled CORMIX1 for Cornell Mixing Zone Expert System, Subsystem 1. CORMIX1 is a subsystem of CORMIX, which will include stratified environments, negatively buoyant discharges, and bottom attachments. CORMIX1 is primarily intend- ed for applications to flowing ambient water (such as rivers or estuaries), although the limiting cases of non-buoyant discharges and stagnant environments are included. The emphasis of CORMIX1 is on discharge geometry and characteristics of legal mix- ing zone (LMZ) requirements, including the toxic dilution zone (TDZ). CORMIX1 can summarize dilution characteristics of the proposed design, flag undesirable designs, give dilution characteristics at legally impor- tant regions if specified, and recommend design alterations to improve dilution characteristics. Scope of Model CORMIX1 (Figure 1) is a series of soft- ware subsystems or elements for the analysis and design of conventional or toxic single port submerged buoyant or non- buoyant pollutant discharges into unstratified water sources, with emphasis on the geometry and dilution characteristics of the initial mixing zone. It is designed as an analysis tool for regulators, dischargers, and students of hydraulics. The user supplies CORMIX1 with infor- mation about the discharge and the am- bient environment. CORMIX1 returns infor- mation detailing the hydrodynamic mechanisms controlling flow and dilution, geometric information concerning the shape of the pollutant plume or flow in the ambient water body, and design recom- mendations allowing the user to improve the dilution characteristics of the flow. If specified by the user, CORMIX1 also presents information about the legal mix- ing zone dimensions and dilution, toxic mix- ing zone requirements, and zone of interest characteristics for the flow. CORMIX1 uses two programming languages, M.1 and FORTRAN. M.1 is ef- ficient in knowledge representation and symbolic reasoning. It is, however, relatively weak in numerical computational ability. FORTRAN is ideal for computation of mathematical functions but is poorly suited for the tasks associated with symbolic reasoning. Thus, M.1 is employed to imple- ment the knowledge acquisition, model selection, and hydrodynamic simulation analysis portions of the expert system. FORTRAN is used for the computation of various length scales and in the hydrodynamic flow simulation models. The M.1 elements of CORMIX1 are DATIN, CLASS, and SUM. M.1 is similar in structure to PROLOG An M.1 program is built from statements containing facts and if-then rules about facts. This knowledge base is supplied by the user corresponding to a problem domain, in this case, buoyant submerged jets and hydrodynamic mixing processes. M.1 programs are driven by a "goal" that the program tries to validate by searching the knowledge base to construct a "proof" using the facts and rules in the knowledge base needed to deduce the goal as a valid hypothesis DATIN is an M.1 program for the entry of relevant data and for the initialization of the other program elements. The purpose of DATIN is to specify completely the physical environment of the discharge as well as legal or regulatory specifications DATIN tries to satisfy the goal by creating a valid parameter input file for the other CORMIX1 elements. The goal is the statement that drives the execution of DATIN The knowledge base in DATIN is built from rules that contain expressions that force M.1 to seek valuations from other rules. M.1 will never assign a valuation that is a contracdiction within a rule, so the user is assured that whatever valuations are con- cluded are taken from a rule within the knowledge base. CLASS is an M.1 program that classifies the given discharge into one of many possi- ble flow configurations. The goal of CLASS is to find a valuation for the expression "flow class" from the flow classification scheme. When the appropriate flow classification rule fires, a detailed hydrodynamic description of the flow is pro- vided to the user. This detailed output in- cludes a description of the significant near- field mixing processes or the hydrodynamic mixing zone (HMZ). The HMZ is defined to give additional information as an aid to understanding mixing processes and to distinguish it from purely legal mixing zone definitions. CLASS also creates a cache output file that supplies the next CORMIX1 element, the FORTRAN hydrodynamic simulation program HYDRO. SUM is an M.1 program that summarizes the hydrodynamic simulation results for the case under consideration. SUM comments on the mixing characteristics, evaluates how applicable legal requirements are satisfied, and suggests possible design alternatives to improve dilution. Thus, SUM may be used as an interactive loop to guide ------- Ml DA TIN User Input file CXD Fortran PA RAM Parameter Computation file CXP Ml CLASS Flow Classification file CXC Iteration Alternatives Corrections file CXI Fortran HYDRO Prediction/Simulation Program file CXO Ml SUM Summary Evaluation Recommendations (Legal/Engineering) the tabular output file that gives detailed in- formation on the trajectory and dilution of the hydrodynamic flow simulation. Conclusions and Recommendations In a test application, the results of the hydrodynamic simulation agreed with field and laboratory data. In particular, CORMIX1 correctly predicted highly complex discharge situations involving boundary in- teractions and buoyant intrusions, a result not predicted by other existing initial mix- ing models. What has been attempted here is to place a modestly complex hydrodynamic simulation methodology within the framework of a rule-based expert system. Many of the common pitfalls of model use - incomplete or contradictory data, choice of appropriate simulation model, and faulty interpretation of results - appear to be mitigated within the context of an expert system methodology. CORMIX1 facilitates the user's understanding of important hydrodynamic processes controlling the flow. It gives three-dimensional discharge trajectory and dilution. It alerts the user to where signifi- cant legal criteria apply to the discharge. CORMIX1 allows for rapid evaluation of design alternatives and gives the user sug- gestions for improving dilution characteristics of the discharge. Overall, CORMIX1 appears to be an excellent analysis tool. Although limited data are available for both field and laboratory experiments, fur- ther efforts will be made to compare model predictions and adjust parameters in the flow classification. Figure 1. System elements of CORM/XJ the user back to DATIN in order to alter design variables. The output of SUM is ar- ranged in four groups — site summary, hydrodynamic simulation summary, data analysis, and design recommendations. The FORTRAN elements of CORMIX1 are PARAM and HYDRO. PARAM and HYDRO are executed after the user has successfully completed DATIN and CLASS. PARAM is a FORTRAN program that com- putes relevant physical parameters for the given discharge situation. This includes the various length scales, fluxes and other values needed by the other CORMIX1 elements. PARAM also computes the max- imum value for each specified mixing or in- terest zone for each of the possible hydrodynamic simulation termination criteria. HYDRO is a FORTRAN program that runs the hydrodynamic simulation program for the flow classification program specified in CLASS. HYDRO consists of control pro- grams or "protocols" for each hydro- dynamic flow classification specified by CLASS. HYDRO assembles the appro- priate simulation from the modules. HYDRO also creates a tabular output file of the simulation containing information on geometry (trajectory, width, etc.) and mix- ing (dilution and concentration). After HYDRO has executed, the user may view ------- Robert L. Doneker and Gerhard H. Jirka are with Cornell University, Ithaca, NY 14853. Thomas O. Barn well. Jr., is the EPA Project Officer (see below). The complete report, entitled "CORMIX1, An Expert System for Mixing Zone Analysis of Toxic and Conventional, Single Port Aquatic Discharges," (Order No. PB 88-220 504/AS; Cost: $32.95, subject to change) will be available only from: National Technical Information Service 5285 Port Royal Road Springfield, VA 22161 Telephone: 703-487-4650 The EPA Project Officer can be contacted at: Environmental Research Laboratory U.S. Environmental Protection Agency College Station Road Athens, GA 30613 United States Environmental Protection Agency Center for Environmental Research Information Cincinnati OH 45268 Official Business Penalty for Private Use $300 EPA/600/S3-88/013 0000329 PS U S EWVIR PROTECTION *GE»CY CMICA60 M It 60604 liHiitliiiilliillimliililiill ------- |