Modeling Water Quality in Rivers

This study reports a PC software, used in a Window s-based environment, which was developed based on the first order reaction of Biol ogical Oxygen Demand (BOD) and a modified Streeter and Phelps equation, in order to simulate and deter min the variations of Dissolved Oxygen (DO) and of the BOD along with the studied river reaches. The s oftware considers many impacts of environmental factors, such as the different type of discharges ( concentrated or punctual source, tributary contribu tion, distributed source), nitrogenous BOD, BOD sedimenta tion, photosynthetic production and benthic demand of oxygen, and so on. The software has been used to model the DO profile along one river, with the aim to improve the water quality through suitab le engineering measure.


INTRODUCTION
Since [1] have established a primary differential relationship between BOD concentration and passing distance (or time) for the Ohio River in the United States, this formula became of the base of many succeed studies. For example, [2] presented a more complete oxygen balanced relationship, in which the oxygen consuming caused by bed slime and photosynthesis were considered, except for the decay of BOD and re-aeration through the water surface [3] . Analyzed the Neckar River in German, by the use of a multi-parameter water quality model, which consists of 9 equations and contains 12 ambient parameters [4] . Developed the so-called Simucev Model, which is characterized by considering the second order reaction of pollutants, suitable for the application in the long reach of rivers under anaerobic condition. Simucev Model has been used to simulate the variations of COD, BOD 5 and DO in a reach of the Leine River (Europe) with the length of 240km. The computational results were compared with those resulted from the famous Qual II Model, developed by EPA, U.S.A [5] . However, the comparisons presented that the Quail II Model exists more difference in the observed data.
Based on the Streeter and Phelps' model, [6] presented a mathematical model of river self-purification, which has programmed by using Pascal Language as early as in 1989 and can operate in PC (16 bits) under DOS system. This model has been used to simulate the water quality of the rivers in Brazil. Due to the quickly developing and renewing of computer facilities and graphical visualization techniques, the program is no doubt out-of-date. It is necessary to renovate the previous code for his future employing. This study presents our recent work to rewrite such a code into a practical software in engineering, which can be easily used in a Windows-based environment by engineers as one of tools for analyzing water quality in rivers.

Self-Purification Modeling:
It is well known that [1] formalized the oxygen, consumed by bacteria to aerobic oxidation of matter organic in waters as follows: where, L is carbonaceous BOD, varying with time t, or say, passing distance x (x = Vt, V: stream velocity); k 1 stands for deoxigenation coefficient, depending basically on the nature and concentration of substratum, the quantity of bacteria and water temperature in rivers. The absorbable atmospheric oxygen through the free water surface must be considered in order to complete the oxygen balance in river waters. The natural reaeration tends to compensate the existent oxygen deficit D, whose variation can be expressed as follows: where, k 2 is so-called re-aeration coefficient, depending on the stream velocity, temperature, water depth of the river and others. The deficit D is defined by the difference between the saturated dissolved oxygen DO s and current dissolved oxygen DO: Hence, the variation rate of dissolved oxygen deficit with respect to time in river waters, as a competitive effect of both deoxygenation and superficial reaeration, can be written by: Integrating equation (4) by starting from up-reach's BOD and a deficit, L o and D o , we have: Which expresses the deficit at any moment and is denominated by Streeter and Phelps equation.
Further modification of water quality models based on Streeter and Phelps equation is generally to involve more complex environmental factors. Due to the flocculating settling caused by absorption, accelerated by carbonaceous BOD in polluted river waters, the effect of diffusion into biological slime can be expressed with a sedimentation coefficient of carbonaceous BOD, k 3 , which also depends on the stream velocity of the river (or turbulence). It is possible to express the removable total carbonaceous BOD as a single coefficient k r , namely the carbonaceous BOD removal coefficient, written by: Therefore, the removed total carbonaceous BOD at time t (L t ,) is governed by: Similarly, the removed total nitrogenous BOD due to nitrification at time t (N t ) can be written by: where, k n represents the nitrogenous BOD removal coefficient, depending on the same factors as k 3 .
Integrating equations (7) and (8) were, A stands for the mean transversal section of studying river reach. In general, the effects of photosynthetic production and benthic demand of oxygen need to be considered by way of making a complete water quality model. The photosynthetic production coefficient of oxygen, F, represents net production of oxygen for alga and basically depends on the presents and their contents of nutrients, on the temperature and transparency of water, and also on luminosity conditions, respectively. In rivers with deep color and high turbidity, which flow with a mean velocity over 0.2m/s, the coefficient F can be ignored. The benthic demand coefficient of oxygen, P, presupposes the sedimentation of matter organic and expresses the soluble by-products of BOD (such as acid volatiles) for the anaerobic decomposition of sediments in the bottom. This coefficient depends on the same factors as k 1 and k 3 . When rivers practically without the sedimentation of matter organic and their mean velocities more than 0.2m/s, P also can be ignored.
By introducing the effects of BOD sedimentation, the benthic demand and photosynthetic production of oxygen, [6] modified Streeter and Phelps equation and obtained following expression: [7] Elaborated this modified expression and developed one formulation, which is easily programmable. [8] Further introduced some modifications into this expression, including the final carbonaceous BOD, nitrogenous BOD and distributed BOD, and rearranged equation (11): where, F c represents the relation between the final carbonaceous BOD and carbonaceous BOD of five days (BOD 5 ) in the studied river reach. The studied river usually needs to be divided into different races, in terms of their physical characteristics and homogeneous biochemistry from the point of view of self-purification. Also, These races can be defined as the function of external factors, such as the occurrence of pollutant source and effluvium release, the existence of important reception or tributary convergence, and so on. Figure 1 illustrates one typical situation, in which all of possibilities simulated by the model occurred. In this example, the mainstream was divided into three races, according to two wastewater discharges from industries A and B, and one tributary into the river. According to the balance principle of mass at the beginning of one studied reach, following boundary conditions after mixing exist (Fig. 2): The final flow-rate or down reach's one can then be written as follows: By taking these boundary values and using the equations (17), (9), (10), (12) and (3), it is possible to carry out one calculation from up reach to down reach, through every computational grid, to obtain the values of Q, L, N, D and DO at the end of the first race. Repeating this sequence of calculation to the next race and considering the previously obtained results as the boundary values, we can operate this calculation successively.

Aguario-2.0 Software:
The software for modeling the water quality in rivers, namely AguaRio-2.0, has been developed in support of Delphi 5.0. This software can be used easily for simple, one-dimensional steady water quality analyzing and simulating in rivers, and also for the alternative assessment of pollutant treatment engineering. Figure 3 shows the main menu of AguaRio-2.0, which consists of nine menus, namely 'File', 'NoReaches', 'UpReaches', 'Parameters', 'SubReaches', 'Show Data', 'Calculate', 'Results' and 'Help' as well as one toolbar.
The user of this software can input all data of physical, environmental and computational parameters relative to the interested river reaches through four dialog boxes: 'Number of Studied Reaches', 'Up-Reach boundary conditions', 'SubReaches' and 'Parameters', where the formal three are simple dialog boxes and the last is tagged one. Figure 4 shows the coefficients' page of the tagged parameters dialog box. In order to further use the data input into the 'Parameters' dialog box, the user can save these data as a text file through |File|Save|.
Two tables can display the input data by clicking the pull-down menus of 'Show Data' menu. The 'Up-Reaches' table presents the up-reach's boundary conditions and the 'Reaches' table show the parameters and variables of divided reaches as well as the selected computational step-length. If the user only uses the data that have been saved previously, it is no necessity to repeat the input procedure in the 'Parameters' dialog box and only to invoke the saved file by |File|Open|.  After inputting and checking data, the user can then run the program by clicking 'Calculate' menu. The calculated results can be displayed in the forms of both tables and graphics. Clicking pull-down menus: ' Table', 'Save Tab' and 'Print Tab' under 'Results' menu, the user can view, save and print the output data. Similarly, clicking 'GraDO', 'SaveGraDO' and 'PrintGraDO', 'GraBOD5' and 'GraNBOD', the user can view, save and print the profiles of dissolved oxygen (DO), carbonaceous BOD (BOD5) and nitrogenous BOD (NBOD) along with the calculated river reaches.

Application:
The developed software has been used to calculate one river with a length up to 123 km. Figure 5 briefly presents the sketch of simulated situation, where A, B, and C express three cities and 1, 2 and 3 three tributaries, respectively, except for eight concentrated discharges from industries. These three cities have total up to 390 thoughts populations with A, 40,000, B, 290,000 and C, 60,000, respectively. In these cities, there are currently no sewage treatment plants; the discharge of domestic sewage has to be approximately considered in the form of distributed sources. The main stream falls into a lake at the point of 123 km, where the requirement of water quality is that they DO, at least, no lower than 4 mg/l, i.e., the value of DO for the third class water, in order to remain a reasonable ecological Equilibrium and to guarantee the downstream demand of water supply. The field observations has found out that the poor quality of river water mostly happens since the river passes through the City B, due mainly to the effects of large population and five concentrated sources from the city and his suburbs. The engineering consideration is to build a water treatment plant for the City B, which will be greatly reducing the discharge loads and be favorable to recover the quality of river water. Different engineering alternatives have been calculated by using the software to model the profiles of DO along this river with the observed environmental parameters and coefficients, the number of divided reaches is up to 14 (see Table 1). Figure 6 illustrates a simulated representative variety of dissolved oxygen along the river in low water season. It is clear that the three infants which inflow into the mainstream at 37 km, 51 km and 96 km, respectively, positively increase the DO of river water, owing to their relatively better water quality and greater water quantity. However, the contributions of concentrated and distributed sources, especially those from the City B (mainly ranged from 74 to 96 km), are so poor that the DO quickly decreases, with the value lower than 4 mg/l from 87 km and a minimum one of 3.28 mg/l appeared at 96 km. The DO at 123 km is also lower than 4 mg/l, equals 3.48 mg/l. Although the profile of DO has been elevated over 4 mg/l for a while because of the convergence of the third tributary, the value of the DO is still smaller than 4 mg/l again, due to the discharge from the City C (105 -116 km) and the effect of the discharges from up-reaches. This simulation coincides with the observed data at three stations, marked through AguaRio2.0 and in Figure 6, with the ranks of DO values at S-1(75 km): 4.2-5.5 mg/l, S-2(95 km): 2.9-3.7 mg/l, S-3(121 km): 3.8-4.3 mg/l, respectively. The ability of river self-purification, obviously, cannot recover the water quality to a security value in the calculated reach. It is necessary to take some engineering measures to accelerate the recovery the water quality of the river. Several alternatives have been calculated and the obtained results are analyzed.
For example, the treatment in primary grade for three industrial discharges and domestic sewage from the City B is to remove 50% of pollutant load (L c , L d and N d ). In this case, the simulated results (Fig. 7) shows that the mainstream can satisfactorily recover his water quality with a minimum value of DO up to 4.15 mg/l and the value of DO at 123 km reach to 4.5 mg/l.

CONCLUSION
Mathematical models of water quality, such as the one introduced in the study, can constitute powerful and practical tool, with the aim of the assessment and analysis of engineering alternatives and the protection of water resources, besides their other correlative applications. However, the utilization of such models must be careful, as the precisions of models strongly depend on the adopted various environmental parameters and coefficients, which have to be obtained through long-term field investigations and a lot of laboratory work.
AguaRio-2.0 Software, produced in support of powerful and smart Delphi 5.0, is easy to be used in a Windows-based environment by vast civil engineers and environmentalists.