ases16v3n3y2008

Embed Size (px)

Citation preview

  • 8/2/2019 ases16v3n3y2008

    1/20

    Doddi Yudianto and Xie Yuebo, 2008. The Development of Simple Dissolved Oxygen Sag Curve in Lowland Non-Tidal River By Using MATLAB.

    137

    Journal of Applied Sciences in Environmental Sanitation, 3 (3): 137-155.

    Theoretical Paper

    THE DEVELOPMENT OF SIMPLE DISSOLVED OXYGEN SAG CURVE INLOWLAND NON-TIDAL RIVER BY USING MATLAB

    DODDI YUDIANTO* and XIE YUEBO

    State Key Laboratory of Hydrology-Water Resources and Hydraulic Engineering, Hohai University,

    Nanjing, 210098, China *Corresponding Author; E-mail: [email protected]

    Received: 1st September 2008; Revised: 18th September 2008; Accepted: 19th September 2008

    Abstract: This paper was aimed to provide more detail explanation focusing on thedevelopment of simple dissolved oxygen (DO) sag curve in a lowland non-tidal river under steady flow condition. Steady state and dynamic models employed are basicallydeveloped by MATLAB using two mathematical functions of ode45 and pdepe. Thedeveloped numerical models showed a good accuracy to steady state analyticalmethods. The plug flow model without dispersion brought about the concentration of DO

    and the ulimate biological oxygen demand (BODu) are slightly lower than the dispersionmodel. As a result of dispersive mixing, the intersection point between deoxygenationrate and reaeration rate moves a bit downstream from the point where critical DO deficitoccurs. It was found that mass fluxes due to advection are greater than dispersivefluxes.

    Keywords: DO sag curve, lowland non-tidal river, steady flow, MATLAB

    INTRODUCTION

    Problems associated with the reduction of DO concentration in rivers have become matters of concern since over a century ago. Started by the introduction of Fickian analogies as initialconcept of diffusion, there has been a long history of the use of quantitative techniques to assessthe impacts of pollutants on dissolved oxygen concentration in river systems. Only after theestablishment of classical equation of dissolved oxygen (DO) and biological oxygen demand(BOD) by Streeter and Phelps in 1925, however, a significant development of water qualitymodels was truly identified [1, 2]. In general, the variability of DO concentration in rivers isinfluenced by many factors in which those major influences can be categorized as being either sources or sinks of DO in rivers. As major sources of DO, the oxygen are usually obtained fromthe reaeration/enhanced aeration process, photosynthesis oxygen production, and introduction of DO from other sources such as tributaries. On the other hands, the depletion of DO can be

    ISSN 0126-2807

    Volume 3, Number 3: 137-155, September-December, 2008 T2008 Department of Environmental EngineeringS e p u l u h N o p e m b e r I n s t i t u t e o f Te c h n o l o g y, S u r a b a y a& Indonesian Society of Sanitary and Environmental Engineers, JakartaO p e n A c c e s s h t t p : / / w w w . t r i s a n i t a . o r g

  • 8/2/2019 ases16v3n3y2008

    2/20

    Doddi Yudianto and Xie Yuebo, 2008. The Development of Simple Dissolved Oxygen Sag Curve in Lowland Non-Tidal River By Using MATLAB.

    138

    Journal of Applied Sciences in Environmental Sanitation, 3 (3): 137-155.

    caused by the oxidation of organic material and other reduced matter in the water column,degassing of oxygen in supersaturated water, respiration by aquatic plants, addition of BOD bylocal runoff, removal of oxygen by nitrifying bacteria, and the oxygen demand exerted by river bedsediments.

    In water quality modeling, most of those processes above are expressed in mathematicalterminology in the form of differential equations. It would be prohibitively complex to simulate allof the chemical reactions and biological processes affecting each element. It is also notnecessary or not possible to measure all data from the field site. Therefore, many availabledissolved oxygen models usually employ the extended versions of Streeter and Phelps equationsto describe the BOD and DO profiles along natural rivers [2, 3]. The simplest manifestation of thisequation is usually applied for a river reach characterized by plug flow system with constanthydrology and geometry under steady state condition. For a large river or estuary, thephenomenon of DO and BOD distribution becomes even more complex since it is mostlyinfluenced by a considerable longitudinal dispersion. Therefore, the aim of this paper is to providedetail explanation focusing on the development of simple dissolved oxygen sag curve in lowlandnon-tidal river under steady flow condition. Some components of dissolved oxygen sources andsinks will be ignored instead of the tidal effect.

    METHODOLOGY

    In order to gain better understanding of the process of water quality model development, twosimple models are presented in this paper to provide clear description especially about thedissolved oxygen sag curve introduced by Streeter and Phelps. Both steady state and dynamicsimulations employed here are basically done by MATLAB using two main mathematicalfunctions:ode45 and pdepe. Under steady state condition, the first model was developed by onlyconsidering the advection fluxes. While as a dynamic plug flow system with dispersion, the givensystem of partial differential equations (PDEs) is solved by taking into account both advection anddispersion fluxes. Since the dynamic model will gain a steady state condition after the equilibriumtime is reached, the analytical solutions for both cases are used to evaluate the accuracy of thosedeveloped numerical models. As the equations contain some driven parameters, the dynamicmodel is further used to simulate some scenarios or synthetic examples which are closely relatedto the aim of the paper. Besides illustrating the influence of longitudinal mixing on the DO sagcurve, the concept of waste load allocation and enhanced aeration will also well explained in thepaper.

    Streeter and Phelps EquationsIt was really a great achievement when Streeter and Phelps, in 1925, were able to propose a

    mathematical equation that demonstrating how dissolved oxygen in the Ohio River decreasedwith downstream distance due to degradation of soluble organic biochemical oxygen demand. Byconsidering a first order of degradation reaction, for a constant river velocity, the classicalequations of Streeter and Phelps can be written as follows.

    ( )C C k Lk dx dC

    udt dC

    sad x += (1)

    Lk dx dL

    udt dL

    d x = (2)

    Dk Lk dx dD

    udt dD

    ad x += (3)

  • 8/2/2019 ases16v3n3y2008

    3/20

    Doddi Yudianto and Xie Yuebo, 2008. The Development of Simple Dissolved Oxygen Sag Curve in Lowland Non-Tidal River By Using MATLAB.

    139

    Journal of Applied Sciences in Environmental Sanitation, 3 (3): 137-155.

    where C is DO concentration (ML3); L is ultimate BOD concentration (ML3); D is DO deficitconcentration (ML3); C s is saturated dissolved oxygen concentration (ML3); u x is the cross-sectional averaged flow velocity (LT1); k d is first order deoxygenation rate constant (T-1); k a is firstorder reaeration rate constant (T-1).

    If the equation is mathematically consider to be steady state ( 0=dt dC ), then the aboveequations will form initial value problems (IVPs) which can be easily solved by any availablenumerical methods suit for ordinary differential equations (ODEs). However, since this paper emphasizes more on the distribution of oxygen in lowland non-tidal river, it is not appropriate toleave the dispersion parameter out from the model [4, 5, 6]. In real system, due to variouschanges of slope, morphology or irregularity of river bed and bank, sequences of pools and riffles,roughness, and large turbulent eddies, the role of dispersion term becomes even more crucial [7,8, 9]. The steady state plug flow model without dispersion, in this case, is used only to show theinfluence of longitudinal mixing on the sag curve profiles given by the following equations after theequilibrium time is reached.

    ( )C C k Lk dx C d

    E dx dC

    udt dC

    sad x x ++= 22

    (4)

    Lk dx

    Ld E

    dx

    dLu

    dt

    dLd x x += 2

    2

    (5)

    Dk Lk dx

    Dd E

    dx

    dDu

    dt

    dDad x x ++= 2

    2

    (6)

    where E x is longitudinal dispersion coefficient (L2 T-1).

    Estimation of Model Parameters As it can be noticed from the above equations, there are five factors that affecting the profile

    of dissolved oxygen sag curve in river systems. Besides the advection and dispersion fluxes, thereaeration rate and degradation rate which assumed to follow a simple first order decay rate willalso in fact influence the distribution of DO and BOD concentration. According to Wallis andManson [9], the generation of longitudinal dispersion in open channel flows basically can beexpected to be proportional to the differential longitudinal advection and inversely proportional tothe cross sectional mixing. Since both advection and dispersion processes here are governed bythe presence of velocity gradients, the involvement of hydraulic model to derive longitudinal flowvelocities is, without excuse, very important.

    Average Flow Velocity (U x ) In fact, it is difficult to measure the net non-tidal velocity due to freshwater discharge of an

    estuary. Usually, the flow velocity is estimated in one or two ways: (1) using the empiricalhydraulic equation or (2) from release of fluorescent dye at high/low water slack tide [3]. In manyapplications of water quality models development, also supported by a theoretical research doneby Yudianto and Xie [10] on the distribution of contaminant under non-uniform velocity of steadyflow regimes, however, taking assumption of using the cross-sectional average flow velocity isfound to be sufficient to produce accurate results from one dimensional model under steady flowcondition. For a prismatic channel, the average flow velocity can be generally calculated by usingthe Manning formula as defined in the following equation.

    213

    21

    SP A

    nu x

    = (7)

  • 8/2/2019 ases16v3n3y2008

    4/20

    Doddi Yudianto and Xie Yuebo, 2008. The Development of Simple Dissolved Oxygen Sag Curve in Lowland Non-Tidal River By Using MATLAB.

    140

    Journal of Applied Sciences in Environmental Sanitation, 3 (3): 137-155.

    where A is cross-section area (L2); P is cross-section wet perimeter (L); andS is longitudinalchannel bed slope.

    Longitudinal Dispersion Coefficient ( E x )

    As clearly mentioned in many literatures, the dispersion coefficient could be technicallydetermined by using any available predictive equations such as McQuivey and Keefer (1974),Fischer (1975), Jain (1974), Liu (1977), Seo and Cheong (1998), and Deng et all (2001), etc [3,9]. Although most of these equations have been widely applied in many research works, however,Wallis and Manson [9] showed that such predictive equations result a wide range values of dispersion coefficient for the same case of in bank flow. As the dispersion coefficient may quitevary from one method to another, this paper will only consider the mostly cited equation whichwas developed by Seo and Cheong.

    *

    62.0428.1

    *

    915.5 HuH W

    uu

    E x x = (8)

    where W is water surface width;H is average water depth; and u* is shear/friction velocity.Since the degradation rate was obviously included in the models, the reaction number R xn was used to evaluate the required process. Mathematically, the reaction number is expressed asfoloows:

    2 x

    x d xn

    uE k

    R = (9)

    If the reaction number is less than 0.1, then advection predominates and a modelapproaching plug flow is appropriate. On the other hands, if the reaction number is greater than10, it can be stated that the dispersion controls the transport and the system is completely mixed.

    Constants of Reaeration Rate and Deoxygenation Rate ( k a and k d ) Since OConnor and Dobbins developed the first model equation for calculating the reaeration

    rate constant in rivers in 1958, there have been numerous researches done in this field by suchas Churchill et al. (1962), Owens et al. (1964), Tsivoglou and Neal 1976, USGS - Melching andFlores (1999), Thackston and Dawson (2001) [3, 11]. Most of those developed formulas,pertaining different river velocity (at 200C), are usually empirical power function relationships asfollows:

    n

    m x

    a H cu

    k = (10)

    where c , m and n are the empirical constants dependent on the physical and hydraulic conditionsof the channel.

    In this paper, the reaeration formula proposed by OConnor and Dobbins was selected andapplied for all simulations of the models. The complete formula of OConnor and Dobbins in SIunit is expressed by taking values of c = 3.93, m = 0.50, and n = 1.50.

    Furthermore, referring to Schnoor [3], the value of deoxygenation rate applied for large river and estuary usually ranges between 0.05 and 0.50 day-1. Since this deoxygenation rate isgenerally estimated based on the model calibration, for the simulations in this paper, thedeoxygenation rate is assumed to be 0.50 day-1.

    Saturated Dissolved Oxygen ( C s) Reaeration is basically a process of absorption of atmospheric oxygen into the water. This

    process is in fact regarded as one of the most important factors controlling the waste assimilation

  • 8/2/2019 ases16v3n3y2008

    5/20

    Doddi Yudianto and Xie Yuebo, 2008. The Development of Simple Dissolved Oxygen Sag Curve in Lowland Non-Tidal River By Using MATLAB.

    141

    Journal of Applied Sciences in Environmental Sanitation, 3 (3): 137-155.

    capacity of a river since photosynthesis is the only other source of oxygen replenishment. Thereaeration process is generally limited to daylight hours only. If the water is allowed to come toequilibrium with the atmosphere above it, the concentration of DO reached will be fixed for agiven temperature and pressure. This is known as the oxygen saturation concentration and isdescribed by Henrys law. The most frequently used equation in water quality modeling is thatdeveloped by Elmore and Hayes (1960) for distilled water [2]:

    )107774.7()007991.0()41022.0(652.14 352 T T T C s++= (11)

    where T is the temperature in degrees Celsius.

    Development of Numerical ModelsSome of the most common problems in applied sciences and engineering are usually

    formulated in the form of either ODEs or PDEs. Since occasionally the exact solutions in closedform of such problems do not exist in many cases, this makes numerical solutions becomespecial of interest. Water quality and environmental modeling problem, is no exception, has beenexplored and solved up to an extraordinary level of understanding using various numericalmethods to find such an approximate solution as there are tolerance parameters, which mostlyensured to reach a good accuracy.

    Generally, there is a vast amount of literatures on numerical solutions for such kind of differential problems. Some of the well known methods used in solving these problems are finitedifferences, finite volume and finite elements. Aside from these classical approaches, there areother important numerical schemes which have also been widely employed in many mathematicalsoftwares i.e. MATLAB.

    Steady State Plug Flow Model without Dispersion

    As previously mentioned, when the equations (1) (3) are assumed to be steady state( 0=dt dC ), those equations will form a system of ODEs in which distance is the only oneindependent variable. In MATLAB, there are plenty of ODE solvers; among them areode23 (second/third order) andode45 (fourth/fifth order) which implement the Runge-Kutta method asthe most widely used and robust numerical algorithm to solve such kind of problems [12, 13, 14].

    In general, the order of a numerical method is the power of h (i.e. dx) in the leading error term. Since the value of h is very small, the higher of power, the smaller of error produced.Mathematically, the fourth order of Runge-Kutta method can be described as follows.

    ( )43211 226 k k k fk k k f f f h

    y y ++++=+ (12)

    where ( )k k k y x f ,1 = (12.a)

    ++=

    2,21

    2hf y h x f k k k k (12.b)

    ++=

    2,22

    3hf y h x f k k k k (12.c)

    ( )hf y h x f k k k k 34 , ++= (12.d)In order to obtain sufficient accuracy of the results, the numerical models in this paper was

    developed using the fourth/fifth order of Runge-Kutta method (ode45 ).

  • 8/2/2019 ases16v3n3y2008

    6/20

    Doddi Yudianto and Xie Yuebo, 2008. The Development of Simple Dissolved Oxygen Sag Curve in Lowland Non-Tidal River By Using MATLAB.

    142

    Journal of Applied Sciences in Environmental Sanitation, 3 (3): 137-155.

    Dynamic Plug Flow Model with Dispersion In general, there are two common methods for formulating dynamic mass transport in one

    dimensional river system: (1) the plug flow system and (2) the Continually Stirred Tank Reactorsin series system (CSTRs). The QUAL2E, as the most widely used one dimensional water qualitymodel, was developed based on the plug flow system with longitudinal dispersion/mixing andvarious kinetic reactions. Due to the difficulty in expressing the transport process especiallylongitudinal dispersion term, the finite difference method was employed in this model [5, 15].

    The CSTRs system, on the other hands, becomes popular because in the form of ODE form itallows easier formulation of methods for calibration and model evaluation when it is comparedwith PDEs model. A special care, however, must be taken in the development of CSTRs toensure that the numerical dispersion is well introduced when solving the equations toapproximate the real system [2]. A large number of detention storage or cell in series is requiredby CSTRs to obtain the idealized plug flow conditions [3, 5, 16].

    In this paper, the numerical solutions for such dynamic system is performed by PDE model

    developed using the pdepe function of MATLAB. The necessity introducing this method isbecause it offers more possibilities and flexibilities for both beginners and experts to evaluate or even invent a model since there has been a numerous number of mathematic functionsdeveloped inside MATLAB. Libelli et al [17] and Yuceer et al [18], in this case, have recentlyshown some great advanced applications of MATLAB in the field of water quality modeling.

    Besides it can be applied for broader aspect of numerical solution of ODEs, in MATLAB,PDEs with various forms of additional terms can also be easily included and solved as a system.The pdepe function basically applied for initial-boundary value problems consist of systems of parabolic and elliptic PDEs in one space variable and time. In this scheme, the initial conditionsare allowed to be space dependent and boundary conditions to be time dependent. In solvingsystem of PDEs, the pdepe function is generally written in the form:

    +

    =

    x u

    ut x s x u

    ut x f x x u

    x t u

    x u

    ut x c mm ,,,,,,,,, (13)

    According to the above format, the unknown variables which have to be determined later aregathered in the vector u; while the coefficients of the time derivatives are gathered in a diagonalmatrixc (has nothing to do with concentrations). On the right side of equation (13), the functionsf and s, as flux and source term respectively, are also given in the form of vector functions whichdepending on x, t, u and u/x . As a parameter corresponding to the symmetry of the problem,the integer m may take value of 0, 1 and 2 to represent slab, cylindrical, or spherical symmetryrespectively.

    For a complete formulation of the mathematical problem in pdepe MATLAB, it is necessary toset the both initial and boundary conditions as follows.Initial condition : ( ) )(, 00 x ut x u = (14)

    Boundary condition : ( ) ( ) 0,,,,,, =

    + x u

    ut x f t x qut x p , valid for x = x 0 and x = x n (15)

    where p is a function that depends on x, t and u; whileq depends only on x and t .In the pdepe MATLAB, various boundary conditions can also be flexibly formulated either as

    Dirichlet, Neumann or even Cauchy/Robin. Here, as the downstream boundaries of the model aretheoretically equal to zero for positive infinity, Neumann condition is considered for all algorithms.

  • 8/2/2019 ases16v3n3y2008

    7/20

  • 8/2/2019 ases16v3n3y2008

    8/20

    Doddi Yudianto and Xie Yuebo, 2008. The Development of Simple Dissolved Oxygen Sag Curve in Lowland Non-Tidal River By Using MATLAB.

    144

    Journal of Applied Sciences in Environmental Sanitation, 3 (3): 137-155.

    d k eBOD

    L 55

    1 = (21)

    The initial values of DO and BODu are generally estimated based on the assumption of completemixing of river water and wastewater/effluent at the point of discharge. Thus, if Qr , C r , and Lr areriver flow, DO, BODu, immediately upstream of the wastewater, andQw , C w , and Lw are theanalogous waste parameters, initial values are given by:

    w r

    w w r r

    QQQC QC

    C ++

    =0 (22)

    w r

    w w r r

    QQQLQL

    L ++=0 (23)

    (2) Similar to the above condition, under this second scenario, the dynamic plug flow modelwith dispersion model is now applied for different loading of BOD concentrations and volumes.

    The BOD concentrations modeled here are assumed to follow the typical BOD values of domesticwastewater as given by Metcalf and Eddy in theWastewater Engineering [21, 22].

    (3) In order to give clear description about the influence of reaeration to the dissolved oxygensag curve, under the same condition as given in the first scenario, the model is simulated for different values of reaeration rate.

    (4) Since the value of longitudinal dispersion is in fact influenced by many factors aspreviously mentioned, three values of dispersion coefficient are used in the simulations under thefourth scenario.

    (5) As sewage discharges have a variety of effects on the dissolved oxygen contained inwater bodies, the depletion of DO concentration is essential to be further analyzed as part of water pollution control. Because of the importance of DO in the maintenance of aquatic life, thepotential pollution of wastewaters is often described in terms of carbonaceous BOD (CBOD) andnitrogenous BOD (NBOD). In order to show broader application of MATLAB in solving system of ODEs or PDEs, this simple extension of Streeter and Phelps equations is introduced in this paper as additional information. The extended version of Streeter and Phelps equations used in relationwith CBOD and NBOD are given as follows.

    ( )C C k N k Bk dx dC

    udt dC

    sand x += (24)

    Bk dx dB

    udt dB

    d x = (25)

    N k dx dN

    udt dN

    n x = (26)

    where B is carbonaceous BOD and N is nitrogenous BOD.The waste load allocation concept is also applied here by taking some typical values of DO,CBOD, and NBOD resulted from a common wastewater treatment plant using different options of treatment processes (Table 2). The synthetic example for this scenario is obtained from theEnvironmental System Optimization [23].

  • 8/2/2019 ases16v3n3y2008

    9/20

    Doddi Yudianto and Xie Yuebo, 2008. The Development of Simple Dissolved Oxygen Sag Curve in Lowland Non-Tidal River By Using MATLAB.

    145

    Journal of Applied Sciences in Environmental Sanitation, 3 (3): 137-155.

    Table 1: The values of model parameters for different scenario

    Parameters Scenario 1 Scenario 2 Scenario 3 Scenario 4 Scenario 5

    River flow, Qr (m3s-1) 15 15 15 15 1.16

    Flow velocity, u x (ms-1) Eq.(7) Eq.(7) Eq.(7) Eq.(7) 0.09

    Wastewater flow, Qw (m3s-1) 0.1Qr (0.10,0.15,

    0.20)Qr,* 0.1Qr 0.1Qr 0.2Qr

    Deoxygenation rate, kd (d-1) 0.50 0.50 0.50 0.50 0.35

    Reaeration rate, ka (d-1) Eq.(10) Eq.(10)0.80, 1.00,

    Eq.(10)* Eq.(10) 0.50

    Dispersion coef, Ex (m2s-1) Eq.(8) Eq.(8) Eq.(8)Eq.(8),115.74,173.61*

    289.35

    River BODu, Lr (mg L-1) 4.36 [19] 4.36 [19] 4.36 [19] 4.36 [19] -

    Wastewater BODu, Lw (mg L-1) 200(100, 200,

    300)*200 200 -

    Saturated river DO, Cs (mg L-1) 9.02 9.02 9.02 9.02 8.00

    River DO, Cr (mg L-1) 5.00 [19] 5.00 [19] 5.00 [19] 5.00 [19] 8.00

    River CBOD, Br (mg L-1) - - - - 2.0

    River NBOD, Nr (mg L-1) - - - - 5.0

    Wastewater DO, Cw (mg L-1) Max 2.0 Max 2.0 Max 2.0 Max 2.0 Table 2

    Effluent CBOD, Bw (mg L-1) - - - - Table 2

    Effluent NBOD, Nw (mg L-1) - - - - Table 2*)simulated under the same scenario

    Table 2: The effluent quality from treatment options for municipal wastewater [23]

    Treatment Processes CBOD (mgL-1) NBOD (mgL-1) DO (mgL-1)

    1. Secondary (settling + biological oxidation) 25.00 54.00 2.00

    2. Secondary + filtration (microscreening) 13.00 50.00 2.00

    3. Secondary + nitrification 13.00 10.00 2.00

    4. Secondary + nitrification + filtration 7.00 10.00 2.00

  • 8/2/2019 ases16v3n3y2008

    10/20

    Doddi Yudianto and Xie Yuebo, 2008. The Development of Simple Dissolved Oxygen Sag Curve in Lowland Non-Tidal River By Using MATLAB.

    146

    Journal of Applied Sciences in Environmental Sanitation, 3 (3): 137-155.

    RESULTS AND DISCUSSION

    Scenario 1Based on the simulation of both models, it can be clearly seen from Table 3, Fig.1 and Fig.2

    that all numerical schemes developed using the mathematical function of ode45 and pdepe haveshown their high accuracy in solving the given equations. For the steady state plug flow modelwithout dispersion, the maximum value of RMSE obtained is 0.2226x10-7. While under dynamiccondition, after gaining the equilibrium time, the maximum value of RMSE obtained is 0.9477x10-3. Using the dynamic simulations, in addition, numerical calculation process of transient pollutantsin obtaining stable concentration values can be produced for further evaluation as described inFigs.3 5.

    The influence of longitudinal dispersion itself is in fact can be observed in the Figs. 6 - 8 asthe values of DO deficit for the non-dispersion model is slightly higher than the model withdispersion, while the values of DO and BOD are slightly lower. Moreover, from the results given inFig. 9, it can be noticed also that, due to dispersive mixing, the deoxygenation rate (k d L) is equalto the reaeration rate (k aD) at distance of 34.77 km. This is a little bit downstream from the pointwhere the critical deficit of DO occurs at xc = 34.26 km. In general, based on the obtained valuesof reaction number (R xn = 0.0015), it can be concluded that for the synthetic example developedin this paper, the mass fluxes due to advection (u x L and u x D) are greater in magnitude thandispersive fluxes (Figs. 10 and 11), but both transport processes are still important in the water quality modeling point of view.

    Table 3: The residual mean square error values for both models

    Model DO BOD DO deficit

    Model without dispersion 0.2226 x10-7

    0.0069 x10-7

    0.2226x10-7

    Model with dispersion 0.5102x10-3 0.9477x10-3 0.5102x10-3

    0.0

    5.0

    10.0

    15.0

    20.0

    25.0

    0 10 20 30 40 50 60 70 80 90 100 110 120

    Distance (km)

    C o n c e n t r a

    t i o n

    ( m g

    / L )

    Analytical DO Analytical BOD Analytical DOdeficit Numerical DO Numerical BOD Numerical DOdeficit

    Fig.1: The DO sag curve for flog flow model without dispersion

  • 8/2/2019 ases16v3n3y2008

    11/20

  • 8/2/2019 ases16v3n3y2008

    12/20

  • 8/2/2019 ases16v3n3y2008

    13/20

    Doddi Yudianto and Xie Yuebo, 2008. The Development of Simple Dissolved Oxygen Sag Curve in Lowland Non-Tidal River By Using MATLAB.

    149

    Journal of Applied Sciences in Environmental Sanitation, 3 (3): 137-155.

    3.0

    4.0

    5.0

    6.0

    7.0

    0 10 20 30 40 50 60 70 80 90 100 110 120

    Distance (km)

    C o n c e n

    t r a

    t i o n

    ( m g

    / L )

    DOdeficit - model without dispersion DOdeficit - model with dispersion

    Fig.8: Concentration of DO deficit for both models

    0.0

    2.0

    4.0

    6.0

    8.0

    10.0

    12.0

    0 10 20 30 40 50 60 70 80 90 100 110 120

    Distance (km)

    R x n

    R a

    t e s

    ( m g

    / L - d

    a y )

    kdL kaD

    34.77

    Fig.9: Reaction rates profile resulted from the plug flow model with dispersion

    0

    200

    400

    600

    800

    1000

    0 10 20 30 40 50 60 70 80 90 100 110 120

    Distance (km)

    A d v e c t

    i v e

    F l u x e s

    ( m g - k

    m / L

    - d a y )

    uxL, BOD Advection uxD, DO Def icit Advection

    Fig.10: Advective fluxes profile resulted from the plug flow model with dispersion

  • 8/2/2019 ases16v3n3y2008

    14/20

    Doddi Yudianto and Xie Yuebo, 2008. The Development of Simple Dissolved Oxygen Sag Curve in Lowland Non-Tidal River By Using MATLAB.

    150

    Journal of Applied Sciences in Environmental Sanitation, 3 (3): 137-155.

    -1.0

    -0.5

    0.0

    0.5

    1.0

    1.5

    0 10 20 30 40 50 60 70 80 90 100 110 120

    Distance (km)

    D i s p e r s

    i v e

    F l u x e s

    ( m g - k

    m / L

    - d a y )

    ExdLdx, BOD Dispersion ExdDdx, DO Deficit Dispersion Fig.11: Dispersive fluxes profile resulted from the plug flow model with dispersion

    Scenario 2In principal, a waste load allocation must be performed using water quality models when the

    water quality standards are expected to be violated even under conditions that all dischargesmeet their effluent permits. As given in this paper, typical BOD values of domestic wastewater aresimulated to be discharged into a river contained surface water standard criteria under categoryIII. The typical values used for the simulations are 100, 200, and 300 mg L-1 which representweak, medium, and strong concentration respectively. Based on the results obtained, it can benoticed that higher concentration of BOD will cause longer distance required for the river recovery.

    As clearly shown in Fig. 12, when the BOD value is equal to 100 mg L-1, the distance requiredby river to gain 5.0 mg L-1 of DO concentration is 47.00 km. While if a stronger value of DO (200mg L-1) is applied, the river will need much longer distance which is about 107.00 km. Similar conclusion is shown when different volume of waste contain 100 mg L-1 of BOD is discharged intoriver. Based on the illustration given in Fig.13, it can be seen that for waste volumes equal to0.10xQr, 0.15xQr, and 0.20xQr, the required distances for gaining again the standard DOconcentration of 5 mg L-1 are 47.00, 77.00, and 98.00 km respectively.

    (47.00 , 5.02) (107.00 , 5.02)

    0.0

    1.0

    2.0

    3.0

    4.0

    5.0

    6.0

    7.0

    8.0

    0 10 20 30 40 50 60 70 80 90 100 110 120

    Distance (km)

    C o n c e n

    t r a

    t i o n o

    f D i s s o

    l v e

    d O x y g e n

    ( m g /

    L )

    Lw = 100 Lw = 200 Lw = 300

    Fig.12: DO profiles for different loading of BOD concentration

  • 8/2/2019 ases16v3n3y2008

    15/20

    Doddi Yudianto and Xie Yuebo, 2008. The Development of Simple Dissolved Oxygen Sag Curve in Lowland Non-Tidal River By Using MATLAB.

    151

    Journal of Applied Sciences in Environmental Sanitation, 3 (3): 137-155.

    (47.00 , 5.02) (77.00 , 5.01) (98.00 , 5.02)

    2.0

    3.0

    4.0

    5.0

    6.0

    7.0

    8.0

    0 10 20 30 40 50 60 70 80 90 100 110 120

    Distance (km)

    C o n c e n

    t r a

    t i o n o

    f D i s s o

    l v e

    d O x y g e n

    ( m g

    / L )

    Qw = 0.10xQr Qw = 0.15xQr Qw = 0.20xQr

    Fig.13: DO profiles for different loading of waste volume contained 100 mg L-1 of BOD

    Scenario 3 As previously stated that in fact the reaeration process is regarded as one of the most

    important factors controlling the waste assimilation capacity of a river since photosynthesis is theonly other source of oxygen replenishment, some simulations using different value of reaerationrate are done to show its influences to the DO sag curve. Based on the given results, it is shownthat the reaeration indeed influence the recovery process of a river. As illustrated in Fig.14,shorter distance is obtained for higher value of reaeration rate. A transition of reaction rate profile(k aD), however, will occur after a distance of 90.0 km as shown in Fig. 15. In practice, theenhanced reaeration can be done by employing a hydraulic structure i.e. weirs.

    (78.00 , 5.01)

    (60.00 , 5.01)

    3.0

    3.5

    4.0

    4.5

    5.0

    5.5

    6.0

    6.5

    7.0

    0 10 20 30 40 50 60 70 80 90 100 110 120

    Distance (km)

    C o n c e n

    t r a

    t i o n o

    f D

    i s s o

    l v e

    d O x y g e n

    ( m g

    / L )

    ka = 0.80 ka= 1.00 ka = 1.23

    Fig.14: DO profiles for different loading of waste volume contained 100 mg L-1 of BOD

  • 8/2/2019 ases16v3n3y2008

    16/20

    Doddi Yudianto and Xie Yuebo, 2008. The Development of Simple Dissolved Oxygen Sag Curve in Lowland Non-Tidal River By Using MATLAB.

    152

    Journal of Applied Sciences in Environmental Sanitation, 3 (3): 137-155.

    2.0

    3.0

    4.0

    5.0

    0 10 20 30 40 50 60 70 80 90 100 110 120

    Distance (km)

    R x n

    R a

    t e s

    k a D ( m g / L - d

    a y )

    ka = 0.80 ka = 1.00 ka = 1.23

    Fig.15: Reaction rates profile resulted for different value of reaeration rates applied to the model

    Scenario 4 As it is known that for a large river or estuary, the phenomenon of DO and BOD distribution is

    mostly influenced by a considerable longitudinal dispersion as a result of various changes of slope, morphology or irregularity of river bed and bank, sequences of pools and riffles,roughness, and large turbulent eddies or tidal effect, there is a crucial necessity in this paper tointroduce about further influences of dispersive mixing on the DO saq curve. Based on the datagiven in Table 1, it can be seen that three values of longitudinal dispersion used for this purposeare 5.83, 10.00, and 15.00 km2d-1. In fact, a larger value of longitudinal dispersion can be found inreal system and lower flow velocity may occur as there are significant effects such

    tidal/backwater, channel storage, etc [9].Based on the results obtained, it can be noticed that the dispersive fluxes increase as thevalue of dispersion coefficient becomes larger. However, since in this paper it is known that themagnitude of advection transport is much larger compared to the dispersion transport, there isonly a little influence resulted by the increase of longitudinal dispersion on DO sag curve.

    0.00

    0.25

    0.50

    0.75

    1.00

    1.25

    0 10 20 30 40 50 60 70 80 90 100 110 120

    Distance (km)

    D i s p e r s

    i v e

    F l u x e s

    E x

    d L d

    x ( m g - k

    m / L

    - d a y

    )

    Ex = 5.83 Ex = 10.00 Ex = 15.00

    Fig.16: Dispersive fluxes (E x dL/dx ) profile resulted for different value of Ex applied to the model

  • 8/2/2019 ases16v3n3y2008

    17/20

    Doddi Yudianto and Xie Yuebo, 2008. The Development of Simple Dissolved Oxygen Sag Curve in Lowland Non-Tidal River By Using MATLAB.

    153

    Journal of Applied Sciences in Environmental Sanitation, 3 (3): 137-155.

    -0.50

    -0.25

    0.00

    0.25

    0.50

    0 10 20 30 40 50 60 70 80 90 100 110 120

    Distance (km)

    D i s p e r s

    i v e

    F l u x e s

    E x

    d D d x

    ( m g - k m

    / L - d

    a y

    )

    Ex = 5.83 Ex = 10.00 Ex = 15.00

    Fig.17: Dispersive fluxes (E x dD/dx ) profile resulted for different value of Ex applied to the model

    3.0

    3.5

    4.0

    4.5

    5.0

    5.5

    6.0

    6.5

    7.0

    0 10 20 30 40 50 60 70 80 90 100 110 120

    Distance (km)

    C o n c e n

    t r a

    t i o n o

    f D i s s o

    l v e d O x y g e n

    ( m g

    / L )

    Ex = 5.83 Ex = 10.00 Ex = 15.00

    Fig.18: The profiles of DO for different value of Ex applied to the model

    Scenario 5Based on the given data in the above Table 1 and Table 2, MATLAB is used to solve the

    extended version of Streeter and Phelps equations as defined in Eqs. (24) - (26). The longitudinaldispersion coefficient added for the model simulations here is equal to 289.35 m2s-1. As can beseen from the Fig.19 below, for about 50.00 km long of distance, the required dissolved oxygen of 5 mgL-1 can only be continuously maintained if the treatment option no 3 or 4 is adopted. Whenthe treatment option no 2 is employed the river will need about 45.00 km for the recovery. On theother hands, treatment option no 1 perhaps will never be able to meet the standard quality of DO.

  • 8/2/2019 ases16v3n3y2008

    18/20

    Doddi Yudianto and Xie Yuebo, 2008. The Development of Simple Dissolved Oxygen Sag Curve in Lowland Non-Tidal River By Using MATLAB.

    154

    Journal of Applied Sciences in Environmental Sanitation, 3 (3): 137-155.

    (45.00 , 4.99)

    3.0

    3.5

    4.0

    4.5

    5.0

    5.5

    6.0

    6.5

    7.0

    0 5 10 15 20 25 30 35 40 45 50

    Distance (km)

    C o n c e n

    t r a

    t i o n o

    f D i s s o

    l v e

    d O

    x y g e n

    ( m g

    / L )

    Option 1 Option 2 Option 3 Option 4

    Fig.19: The profiles of DO for different municipal wastewater treatment options

    CONCLUSIONS

    Since the variability of dissolved oxygen concentration in rivers is influenced by many factors,the analysis of both oxygen depletion and replenishment becomes essential to the life of aquaticanimals. In order to perform either the prediction of pollutants concentration or critical condition of dissolved oxygen in the water bodies, the water quality models have been therefore widely usedfor over a century. It is necessary to gain better understanding of the dissolved oxygen profile in alowland river in which no tidal effect included, this paper has delivered some basic theoriesrelated to (1) the development of both steady and dynamic numerical models using MATLAB

    under steady flow condition, (2) the influences of longitudinal dispersion and enhanced reaerationrate on the DO sag curve, (3) the concept of waste load allocation, and (4) the broader possibilityof using MATLAB for further water quality models development.

    Based on the results obtained from the model simulations, it is showed that, in comparison tosteady state analytical solutions, the developed numerical models have provided good accuracy.For the plug flow model without dispersion, the values of DO and BODu concentration are slightlylower compared to the model with dispersion. Furthermore, it is also showed that due todispersive mixing, the intersection point of deoxygenation rate and reaeration rate moves a bitdownstream from the point where critical DO deficit occurs.

    As the reaction number obtained is much smaller than 0.10 and shown in the both profiles of advection and dispersion transport, it can be generally concluded that, for the synthetic example

    developed in this paper, the mass fluxes due to advection are greater in magnitude thandispersive fluxes, but both transport processes are still important.

    Since the deoxygenation rate is usually low for most conventional pollutants and as describedin the results of scenario 2 above, a quite long distance might be required by a highly pollutedriver for the naturally river recovery. Under the scenario 3, besides controlling the concentrationand volume of loading waste discharged into the river, the increase of reaeration rate can also beemployed in order to speed the recovery process up. Moreover, a proper treatment option of wastewater is absolutely required to maintain the dissolved oxygen in the river.

    Based on the above simulation results and supported by previous works on water qualitymodeling, it can be finally concluded that MATLAB is an effective tool both for beginners and

  • 8/2/2019 ases16v3n3y2008

    19/20

    Doddi Yudianto and Xie Yuebo, 2008. The Development of Simple Dissolved Oxygen Sag Curve in Lowland Non-Tidal River By Using MATLAB.

    155

    Journal of Applied Sciences in Environmental Sanitation, 3 (3): 137-155.

    experts in the process of water quality model development and is recommended to be used for even broader applications.

    References

    1.

    Beck, M.B., 1978. Modelling of Dissolved Oxygen in a Non-Tidal Stream. In Mathematical Models inWater Pollution Control. Eds. James. A., John Willey and Sons, pp: 137-164.2. Cox, B.A., 2003. A Review of Dissolved Qxygen Modelling Techniques for Lowland Rivers. The

    Science of the Total Environment, 314316 (1): 303334.3. Schnoor, J.L., 1996. Environmental Modeling: Fate and Transport of Pollutants in Water, Air, and

    Soil. John Wiley and Sons, New York, USA.4. Sayre, W.W. and Chang, F.M., 1968. A Laboratory Investigation of Open Channel Dispersion

    Processes for Dissolved, Suspended, and Floating Dispersants: Technical Report. U.S.Government Printing Office, USGS, USA.

    5. Lee, Y.S. and Park, S.S., 1996. A Multiconstituent Moving Segment Model for Water QualityPredictions in Steep and Shallow Streams. Ecological Modelling, 89(1, 3):121-131.

    6. Wong T.H.F., Fletcher, T.D., Duncan H.P. and Jenkins G.A., 2006. Modeling Urban Stormwater

    Treatment - A Unified Approach. Ecological Engineering, 27(1): 5870.7. Warn, A.E., 1989. River quality modelling. In Surface water pollution and its control. Eds. Ellis, K.V.,The Macmillan Press Ltd, pp: 322-342.

    8. Kashefipour, S.M. and Falconer, R.A., 2002. Longitudinal Dispersion Coefficients in NaturalChannels. Water Research, 36(6): 15961608.

    9. Wallis, S. and Manson, R., 2005. On the theoretical prediction of longitudinal dispersion coefficientsin a compound channel. In Water Quality Hazards and Dispersion of Pollutants. Springer, 4:69-84.

    10. Yudianto, D. and Xie, Yuebo. 2008. Contaminant Distribution under Non-Uniform Velocity of SteadyFlow Regimes. Journal of Applied Science in Environmental Sanitation, 3(1): 29-40.

    11. Pelletier, G. and Chapra, S. 2006. A modeling framework for simulating river and stream water quality. Environmental Assessment Program, Olympia, Washington, 98504-7710.

    12.

    Yang, W.Y., Cao, W, Chung, T.S., and Morris, J. 2005. Applied Numerical Methods Using MATLAB.John Wiley and Sons, New Jersey, USA.13. Kiusalaas, J., 2005. Numerical Method in Engineering with MATLAB [M], Cambridge University

    Press, New York.14. Karris, S.T., 2004. Numerical Analysis Using MATLAB and Spreadsheets. Orchard Publications,

    USA.15. Brown, L.C. and Barnwell, T.O., 1987. The enhanced stream water quality models QUAL2E and

    QUAL2E-UNCAS: Documentation and User Manual. US EPA, Athens, Georgia.16. Holzbecher, E., 2007. Environmental Modeling using MATLAB. Springer, Berlin.17. Libelli, S.M., Pacini, G., Barresi, C., Petti, E. and Sinacori, F. 2002. An Interactive Georeferenced

    Water Quality Model. Fifth International Conference on Hydroinformatics, Cardiff, UK.Hydroinformatics 2002.

    18.

    Yuceer M., Karadurmus E. and Berber R., 2007, Simulation of River Streams: Comparison of A NewTechnique with QUAL2E. Mathematical and Computer Modelling, 46(1, 2): 292305.19. Ministry of Environmental Protection of the People's Republic of China and General Administration of

    Quality Supervision, Inspection and Quarantine of the People's Republic of China, 2002.Environmental Quality Standard of People's Republic of China for Surface Water (GB3838-2002).

    20. Thomann, R.V. and Mueller, J.A. 1987. Principles of Water Quality Modeling and Control. Harper Collins, New York.

    21. Metcalf and Eddy, Inc., 1972. Wastewater Engineering. McGraw-Hill, New York, USA.22. Benefield, L.D. and Randall, C.W. 1980. Biological Process Design for Wastewater Treatment.

    Prentice-Hall, Inc. New Jersey, USA.23. Haith, D.A. 1982. Environmental Systems Optimization. John Wiley and Sons, New York, USA.

  • 8/2/2019 ases16v3n3y2008

    20/20

    Doddi Yudianto and Xie Yuebo, 2008. The Development of Simple Dissolved Oxygen Sag Curve in Lowland Non-Tidal River By Using MATLAB.

    156

    Journal of Applied Sciences in Environmental Sanitation, 3 (3): 137-155.

    [This page is intentionally left blank]