You are on page 1of 46

MATHEMATICAL MODELLING OF WATER QUALITY IN PINACANAUAN de

TUGUEGARAO RIVER

A Thesis Proposal presented to the

Chemical Engineering Faculty

Cagayan State University

Carig Sur, Tuguegarao City

In Partial Fulfillment of the Requirements

For the Degree of

Bachelor of Science in Chemical Engineering

Submitted by:

Alumit, Razel V. Jr.

Dulliyao, Van Vesper J.

Guillermo, Denver V.

Mamba, Rhea D.

Maligod, Laica C.

Maruquin, Elha E.
Table of Contents
Chapter 1 ............................................................................................................................................... 4

INTRODUCTION................................................................................................................................. 4

1.1 Background of the Study .............................................................................................................. 4

1.2 Statement of the Problem .............................................................................................................. 5

1.3 Objectives of the Study ................................................................................................................. 5

1.4 Theoretical Framework ............................................................................................................... 34

1.5 Conceptual Framework ............................................................................................................... 37

1.6 Scope and Limitations ................................................................................................................... 6

1.7 Significance of the Study .............................................................................................................. 6

1.8 Locale of the Study ....................................................................................................................... 6

1.9 Definition of Terms....................................................................................................................... 7

Chapter 2 ............................................................................................................................................... 8

REVIEW OF RELATED LITERATURE .......................................................................................... 8

2.1 Pinacanauan River ........................................................................................................................ 8

2.2 Parameters ..................................................................................................................................... 8

2.3 Governing Laws .......................................................................................................................... 10

2.3.1 Conservation Law ................................................................................................................ 10

2.3.2 Hydrodynamics and Transport ............................................................................................. 11

2.4 Numerical Solution of Partial Differential Equations ................................................................. 13

2.4.1 Finite Difference Method ..................................................................................................... 13

2.4.2 Finite Volume Method ......................................................................................................... 18

2.4.3 Finite Element Method......................................................................................................... 19

2.5 Mathematical Model ................................................................................................................... 21

2.5.1 Formulation of Mathematical Model ................................................................................... 22

2.5.2 Water Quality Models .......................................................... Error! Bookmark not defined.

2.6 MATLAB®................................................................................................................................. 31

2.6.1 Water Quality Modelling in MATLAB® ............................................................................ 32

Chapter 3 ............................................................................................. Error! Bookmark not defined.


METHODOLOGY ............................................................................. Error! Bookmark not defined.

3.1 Model Formulation ..................................................................... Error! Bookmark not defined.

3.2 Model Conceptualization ............................................................ Error! Bookmark not defined.

3.3 Calibration Coefficient ................................................................ Error! Bookmark not defined.

3.4 Solution Scheme ......................................................................... Error! Bookmark not defined.

3.5 Initial and boundary condition .................................................... Error! Bookmark not defined.

3.6 Model Application ...................................................................... Error! Bookmark not defined.

References ............................................................................................ Error! Bookmark not defined.


Chapter 1

INTRODUCTION

1.1 Background of the Study

Water is one of the most essential natural resources for the existence and survival of

the entire life on this planet. All living organisms need large quantity and good quality of water

to continue their life (Kang, Gao, & Xie, 2017). Preserving this natural resource and ensuring

its availability therefore is very essential to have quality life not just for the present but also for

the next generations.

As populations and economics grow, water quality is degrading at an alarming rate due

to the increase of pollutant loadings in this natural resource. High organic loadings can reduced

dissolved oxygen to levels that are fatal to parts of the aquatic ecosystem and can cause

intolerable odors. Toxic heavy metals and other micro-pollutants can accumulate in the bodies

of aquatic organisms, including fish, making them unfit for human consumption even if they

themselves survive (Loucks & Beek, 2005). In addition, these pollutants can cause water borne

diseases and can end up in surface and ground water bodies. Addressing this concern, models,

water quality analysis, and evaluation techniques were developed in order to attain water

quality.

Water quality models are very useful in describing the ecological state of the water

system and to predict the change in this state when certain boundary or initial conditions are

altered (Lindenschmidt, 2005). Model will also help to explore various water pollution

scenarios and solve water quality planning and forecasting tasks (Ruzgas, Inga Ruzgiene, &

Tomas, 2014). Also, model can become a helpful tool in the management process, enabling the

user to explore new horizons of the imaginations, to compare choices, and to identify pathways

toward superior solutions to practical problems (Orlob, Mathematical modelling of water

quality: Streams, Lakes, and Reservoirs, 1983).


River water quality is of great environmental concern since it is one of the major

available fresh water resources for human consumption (Jarvie, Whitton, & Neal, 1998). One

of the most popular river water in the Province of Cagayan is the Pinacanauan de Tuguegarao

River. This river supplies water to more than 500 hectares of farms in 8 Barangays of

Peñablanca and 4 Barangays of Tuguegarao City (Espejo, Tungpalan, Negi, & Alex, 2015).

Therefore, the main purpose of this study is to develop a comprehensive process

engineering approach on water quality modelling in Pinacanauan de Tuguegarao River by

means of a mathematical model in order to determine the condition of the river water and

formulate solutions.

1.2 Statement of the Problem

The study focuses on the water quality modelling of Pinacanauan de Tuguegarao River.

It aimed to answer the following questions:

1. What is the current ecological status of the Pinacanauan de Tuguegarao River?

2. Can the developed model be used as an evaluation technique in analyzing water quality

parameters (Dissolved Oxygen, temperature, and pH) of the Pinacanauan de

Tuguegarao River?

3. Is the simulated values of water quality parameters have acceptable compatibility with

the measured values?

1.3 Objectives of the Study

Generally, the study aimed to develop a water quality model of the Pinacanauan de

Tuguegarao River.

Specifically it aimed to:

1. Asses the current ecological status of Pinacanauan de Tuguegarao River.


2. Predict the concentration of the different water quality parameters (dissolved oxygen,

temperature, and pH) of Pinacanauan de Tuguegarao River using the developed model.

3. Determine the difference of the simulated value and the actual values of water quality

parameters using a statistical tool T-test.

1.4 Scope and Limitations

Portion of the Pinacanauan de Tuguegarao River in Brgy. Caggay, Tuguegarao City,

Cagayan was selected as the locale of the study. This study focused on assessing the water

quality of the river and developed a model that will served as a forecasting tool for the different Commented [MJC1]: serve

water quality parameters of Pinacanauan de Tuguegarao River. The parameters considered in

this study were dissolved oxygen, temperature and pH and were gathered On-Site. The

collection of data were gathered from December 20, 2018 to April 28, 2019 with 14 days

interval. Commented [MJC2]: redundant to use collection of data


and gathered..they mean the same thing. better state it this
way: The collection of data were from December….
1.5 Significance of the Study

The mathematical model developed could be used to predict water quality parameters.

Different agencies such as Environmental Management Bureau - Department of Environment

and Natural Resources (EMB-DENR) and Bureau of Fisheries and Aquatic Resources could

adapt the developed model to established justified and reasonable programs for long term

measures for pollutant discharge reduction, rational use of water resources, estimation of the

impact in the environment of technological improvements, development of methods and

monitoring facilities, prediction and quality management of the environment, etc. This research

could also be used by future researchers as a reference in testing the validity of related studies.

1.6 Locale of the Study

This study was conducted at Brgy. Caggay, Tuguegarao City, Cagayan. Water sampling

and collection were done at the selected boundaries of Pinacanauan de Tuguegarao River. A
length of 200 meters long and a width of 121 meters was selected as the sampling site in the

river. Data analyses were done on-site with the supervision of Bureau of Fisheries and Aquatic

Resources.

1.7 Definition of Terms

Diffusion - is the process by which both ionic and molecular species dissolved in water move

from areas of higher concentration to areas of lower concentration

Dispersion - is the process whereby solutes are mixed during advective transport due to

velocity variations caused by flow variations within the pores and by heterogeneities in the

hydraulic conductivity distribution

Dissolved Oxygen – measures the concentration of oxygen dissolved in water. The higher the

DO, the better the condition for the growth and productivity of aquatic resources.

Power of Hydrogen (pH) - a figure expressing the acidity or alkalinity of a solution on a

logarithmic scale.

Pollution Load - amount of pollutant being discharged into the environment; the product of

the wastewater quality or concentration and the volumetric rate of discharge.

Surface Water - all waters open to the atmosphere and subject to surface runoff.

Temperature – is the measurement of how hot or cold a system is. In theoretical terms,

Temperature is what determines the direction of heat flow — out of the region with the higher

temperature and in to the region with the lower temperature.

River reaches - is a length of a stream or river, usually suggesting a level, uninterrupted stretch.

Water Quality - characteristics of water that define its use in terms of physical, chemical,

biological, bacteriological, or radiological characteristics by which the acceptability of water

is evaluated.
Chapter 2

REVIEW OF RELATED LITERATURE Commented [MJC3]: Just hoping all equations found in
this chapter are relevant to your chapter 4. Otherwise, what
is the impact of all these equations to your study?
2.1 Pinacanauan River

The Pinacanauan de Tuguegarao River is one of the foremost water resources in

Cagayan Valley. It is also renowned tourism spot in the province. The clear Pinacanauan River

serves as a national swimming pool for outdoor recreation, source of domestic water for

consumption of nearby communities and support the National Irrigation Administration (NIA)

for irrigating the rice fields and other agricultural lands. (Dayag, Gazmen, & Quizon, 2016)

However, in recent years, pollution of rivers has increased steadily. This situation has

arisen as a result of rapid growth of population, increased urbanization, expansion of industrial

activities, dumping of domestic and raw sewage into nearby water courses, increased use of

fertilizer and agrochemicals, lack of environmental regulations and their tardy implementation

(Aina & Asedipe, 1996).

2.2 Water Quality Parameters

Philippine water quality is assessed based on the set beneficial use as defined in

Department of Natural Resources (DENR)-Administrative Order (DAO) 1990- 34. Under this

DAO, there are 33 parameters that define the desired water quality per water body

classification. Accordingly, a water body must meet the corresponding criteria of each

applicable parameter 100 percent of the time to maintain its designated classification. In the

absence of a water quality index, an interim methodology based on compliance to DAO 1990-

34 is used for all surface waters. Table 1 presents the parameters monitored to assess the water

quality per type of water body (DENR-EMB, 2014).


Table 1: Monitored Water Quality Parameters per Type of Water Body (DENR-EMB, 2014).

Water Body Water Quality Parameter


Inland surface water  Dissolve oxygen (DO)
 Biochemical Oxygen Demand (BOD)
 Total suspended solid (TSS)
 Phosphates
 Nitrates
 Heavy metals
 Cyanide as free cyanide
Groundwaters  Fecal Coliform
 Nitrates
 Salinity (chloride content)
Coastal and marine waters  Fecal Coliform
 Total Coliform
 DO

Table 2: Number of classified inland surface water bodies (EMB National Water Quality
Status Report, 2006)
Classification Definition Number
Class AA Waters intended as public water supply 5
requiring only approved disinfection to meet the
PNSDW.
Class A Waters suitable as water supply requiring 203
conventional treatment to meet the PNSDW.
Class B Waters intended for primary contact recreation 149
(e.g. bathing, swimming, skin diving, etc.)
Class C Waters for fishery, recreation/boating, and 231
supply for manufacturing processes after
treatment.
Class D Waters intended for agriculture, irrigation, livestock 23
watering, etc.
Table 3 and Table 4 shows the standard water parameter for the different water classifications.

Table 3: Water Quality Guidelines for Primary Parameter

Class
Parameter Unit
AA A B C D
BOD mg/L 1 3 5 7 15
Chloride mg/L 250 250 250 350 400
Color TCU 5 50 50 75 150
Dissolved Oxygen mg/L 5 5 5 5 2
Fecal Coliform MPN/100 ml <1.1 <1.1 100 200 400
Nitrate mg/L 7 7 7 7 15
Phosphate mg/L <0.003 0.5 0.5 0.5 5
Temperature C 26-30 26-30 25-31 25-32 26-30
Total Suspended Solid mg/L 25 50 65 80 110
Oil and grease <1 1 1 2 5

Table 4: Effluent Standards

Class
Parameter Unit
AA A B C D
Ammonia as NH3-N mg/L NDA 0.5 0.5 0.5 7.5
BOD mg/L NDA 20 30 50 120
COD TCU NDA 60 60 100 200
Color mg/L NDA 100 100 150 300
Fluoride MPN/100 ml NDA 2 2 2 4
Nitrate as NO3-N mg/L NDA 14 14 14 30
pH (Range) NDA 6.0-9.0 6.0-9.0 6.0-9.0 5.5-9.5
Phosphate mg/L NDA 1 1 1 10
Surfactants (MBAS) C NDA 2 3 15 30
Total Suspended Solid mg/L NDA 70 85 100 150
Oil and grease mg/L NDA 5 5 5 15

2.3. Governing Laws

2.3.1 Conservation Law

A conservation law states that a certain defined quantity remains constant no matter

what changes may occur. This quantity has the same numerical value before and after the

changes occurred. Forces may act on an object between some initial and final time, or between
some initial or final position, but certain quantities have the same value in the final state as it

had in the initial state (The University of Iowa).

2.3.1.1 Conservation of Mass

The law of conservation of mass states that mass is neither created nor destroyed. It is

represented by the continuity equation


   u   0 (1)
t

where ρ is the fluid density, and u is the fluid velocity (Multiphysics CYCLOPEDIA, 2015).

In a controlled volume system fixed in space with the density ρ = ρ(x,y,z,t) and the

velocity v = v(x,y,z,t), the mass balance is given by:

(ρ x ) (ρ y ) (ρ z ) ρ (2)


  
x y z t

2.3.2 Hydrodynamics and Transport

2.3.2.1 Fick’s First Law

Adolf Fick stated that the molar flux due to diffusion is proportional to the

concentration gradient (Multiphysics CYCLOPEDIA, 2015).

Molecular diffusion is a transport process that originates from molecular activity with

concentration gradient as its driving force. The molecular diffusion is described by the

molecular diffusion coefficient Dm (Eldho).

C
Specific mass flux: q   Dm
x

C
Molecular diffusion: q   Dm
x

C
Turbulent Diffusion: q   ε D
x
C
Dispersion: q   K
x

v x
Momentum Flux: T   ρv
y

v x
Turbulent Momentum Exchange: T   ρvt
y

T
Heat Flux: qT   ρC p DT
x

2.3.2.2 Mass Transport Phenomena

Mass transfer describes the transport of mass from one point to another. Mass transfer

may take place in a single phase or over phase boundaries in multiphase systems. In the vast

majority of engineering problems, mass transfer involves at least one fluid phase (gas or

liquid), although it may also be described in solid-phase materials (multiphysics

CYCLOPEDIA, 2015).

 T T T    2T  2T  2T  T
 v x  vy  vz   DT  2  2  2    (3)
 x y z   x y  z  t

2.3.2.2.1 One Dimensional Transport Equation

C C 2C (4)
 vx K 2 I
t t x

The equation was used to solve mass transport along one axis, which is x and this

represents a typical one-dimensional flow.

where: vx = the mean velocity in the x-direction

C = the concentration average over the cross section

I = the sink or source term that describes the reaction of the substance with its

environment.
2.3.2.2.2 Two Dimensional Transport Equation

C  C C   2 C 2 C 
  v x  vy   Kx 2  Ky
 
I (5)
t  x y   x y 2 

This equation depends not only on x variable but also the y variable which represents

a two-dimensional flow.

2.3.2.2.3 Three Dimensional Transport Equation

C   C C C   2 C 2 C  2C 
  v x  vx  vx   Kx 2  Ky  K I (6)
t  t t t   x y z 2 
2 z

The equation considers spatial dimensions: x, y and z.

2.3.2.3 Heat Transfer

Heat transfer from systems of high temperature to systems of lower temperature (Nave,

Heat Transfer, n.d.).

 T T T    2T  2T  2T  T
 v x  vy  vz   DT  2 _ 2  2    (7)
 x y z   x x  x  t

2.4 Numerical Solution of Partial Differential Equations

2.4.1 Finite Difference Method

The finite difference method (FDM) is used to solve ordinary differential equations that

have conditions imposed on the boundary rather than at the initial point. These problems are

called boundary-value problems ( (Kaw, Nguyen, & Snyder, 2012). The FDM works by

replacing the region over which the independent variables in the Partial Differential Equation

(PDE) are defined by grid (also called a mesh) of points at which the independent variable is

approximated. The partial derivatives in the PDE at each grid point are approximated from

neighboring values by using the Taylor’s theorem (D.M.Causon & Mingham, 2010).
Taylor’s Theorem

Let U(x) have n continuous derivatives over the interval a, b . Then for

a  x0 , x0  h  b ,

U xx ( xo ) U ( n1) ( xo )
U ( xo  h)  U ( xo )  hU x ( xo )  h 2  ....  h n1  O( h n ) (8)
2! (n  1)!

where,

dU d 2U d n 1U
Ux  U xx  U ( n 1) 
dx dx 2 dx n 1

U x  ( xo ) is the derivative of U with respect to x evaluated at x  xo

O(h n ) is an unknown error term.

The interpretation of the Taylor’s theorem is that the known value of U and the values

of its derivatives at point xo then equation 8 for its value at the (nearby) point xo + h. The

expression contains an unknown quantity O(h n ) . If the term O(h n ) is discarded in the equation

(i.e. truncate the right hand side of the equation 8), an approximation to U ( x0  h) is observed.

The error in this approximation is O(h n ) (D.M.Causon & Mingham, 2010).

O(h n ) is defined as

f (h)
lim C (9)
h 0 hn

where C is a non-zero constant.

If f(h) = O(h n ) then, for small h, equation 9 gives,

f (h)
C,
hn

(10)
 f (h)  Ch n

Equation 10 says that for small h, an error which is O(h n ) is proportional to hn. In

particular if the error is O(h) then it is proportional to h which means that halving h halves the

error. If the error is O(h2) then it is proportional to h2 which means that halving h reduces the

error by a factor of 22 = 4.

Consider Figure 1, which shows a domain of calculation in the x − y plane. Assume

that the spacing of the grid points in the x−direction is uniform, and given by ∆x. Likewise, the

spacing of the points in the y−direction is also uniform, and given by ∆y. It is not necessary

that ∆x or ∆y be uniform. We could imagine unequal spacing in both directions, where different

values of ∆x between each successive pairs of grid points are used. The same could be

presumed for ∆y as well. However, often, problems are solved on a grid which involves

uniform spacing in each direction, because this simplifies the programming, and often results

in higher accuracy. In some class of problems, the numerical calculations are performed on a

transformed computational plane which has uniform spacing in the transformed-independent-

variables, but non-uniform spacing in the physical plane.


Figure 1: Discrete Grid (Introduction to Finite Difference Method and Fundamentals of
CFD, n.d.)
From Figure 1, the grid points are identified by an index i which increases in the positive

x-direction, and an index j, which increases in the positive y-direction. If (i, j) is the index of

point P in Figure 1, then the point immediately to the right is designated as (i+ 1, j) and the

point immediately to the left is (i−1, j). Similarly the point directly above is (i, j + 1), and the

point directly below is (i, j − 1).

The basic philosophy of finite difference methods is to replace the derivatives of the

governing equations with algebraic difference quotients. This will result in a system of

algebraic equations, which can be solved for the dependent variables at the discrete grid points

in the flow field (Introduction to Finite Difference Method and Fundamentals of CFD, n.d.).

2.4.1.1 Implicit and Explicit Finite Difference Method

Finite difference scheme can be divided into two categories; they are implicit and

explicit scheme. Implicit schemes usually have better stability properties than explicit schemes.

However, explicit schemes have better own advantages, among which are their efficiency and

ease of parallelization, which is becoming more and more important. In explicit schemes, we

have a formula for ui n 1 in terms of known values of ui , at previous time levels, whereas with

an implicit scheme, we must solve the system of equations to advance to the next time level.

(Abdullah, 2007).

Table 5: Major Comparison of Implicit and Explicit Method

Explicit Implicit

Time step must be smaller than a critical Time step can be arbitrarily large, with
value for stability. unconditionally stable schemes.

Small amount of computational effort per Large amount of computational effort per
time step. time step.
No significant numerical damping Numerical damping dependent on time step
introduced for dynamic solution. present with unconditionally stable schemes.

No iterations necessary to follow nonlinear Iterative procedure necessary to follow


constitutive law. nonlinear constitutive law.

Provided that the time step criterion is always Always necessary to demonstrate that the
satisfied, nonlinear laws are always followed abovementioned procedure is: (a) stable; and
in a valid physical way. (b) follows the physically correct path (for
path-sensitive problems).

Matrices are never formed. Memory Stiffness matrices must be stored. Ways must
requirements are always at a minimum. No be found to overcome associated problems
bandwidth limitations. such as bandwidth. Memory requirements
tend to be large.

Since matrices are never formed, large Additional computing effort needed to
displacements and strains are accommodated follow large displacements and strains.
without additional computing effort.

Table 6: Major Advantages and Disadvantages of Implicit and Explicit Method

ADVANTAGES DISADVANTAGES
Explicit The solution algorithm is simple to For a given x , t must be less than
Method set-up a specific limit imposed by stability
constraints.
This requires many time steps to
carry out the calculations over a
given interval of t .
Implicit Stability can be maintained over More involve producer is needed for
Method much larger values of t . setting up the solution algorithm
Fewer time steps are needed to than that for explicit method.
carry out the calculations over a Since matrix manipulations are
given interval. usually required at each time step,
the computer per time step is larger
than that of the explicit approach.
Since larger t can be taken, the
truncation error is often large, and
the exact transients (time variations
of the dependent variable for
unsteady flow simulation) may not
be captured accurately by the
implicit scheme as compared to an
explicit scheme.

2.4.2 Finite Volume Method

According to Weisstein (2018), the finite volume method is a numerical method that

calculates value of the conserved variables averaged across the volume in partial differential

equation form. In application with water quality modelling, partial differential equations is

discretized into cells, inside which the pollutant concentration is conveniently evaluated. The

variation of the concentration is identified in the cell boundary, with the assumption that the

value lost by a cell is gained by the contiguous one. (Benedini M. , 2011).

A solution based on a finite volume calculates the concentrate of solute or suspended

sediment’s advection at each face of any control volume, by means of a modified form of the

highly accurate ultimate quickest scheme (Kashefipour & Roshanfekr, 2012).

The discrete forms of the terms when double integration is to perform in a one-

dimensional advection-dispersion equation (ADE) with respect to time and volume over the

control volume, using finite volume method can be written as follows (Kashefipour &

Roshanfekr, 2012):

t  Δt
 
t V
SA
t
 n 1 n

dVdt  SAi  SAi ΔV (11)
t
t  Δt
  V
SQ
x

dVdt  ψ SQA i 1/2  ψ SQA i 1/2  1  ψ SQA i 1/2  SQA i 1/2 Δt
n 1 n 1 n n 1

 

Δt ψ S i  S i 1  QA i 1/2  S i  S i 1  QA i 1/2  
n 1 n 1 n 1 n 1



n 1

2 (1  ψ) S i  S i 1  QA i 1/2  S i  S i 1  QA in1/2
n 1 n 1 1
  (12)

  2 n 1 S  Si  n 1 S  S i 1   
n 1 n 1

ψ  A D1 i 1/2 i 1 


 A 2 D1 i 1/2 i 

 
t  Δt  S   x i 1 x x x i 1  
t V x AD1 x dVdt Δt 
i i

 2 n 1 S i 1  S i  S i  S i 1 n  

   
n
n
(1  ψ) A D  A 2
D 
xi  xi 1  
1 i 1/2 1 i 1/2
  x i 1  x i

t  Δt QL S L
 
t V Δx
dVdt  QL S L AΔΔ (13)

1 κAS i 1/2  κAS i 1/2 


n 1 n 1
t  Δt
 V t
   ΔVΔt    ΔVΔt
d d
S dVdt S  (14)
4 κAS in1/2  κAS in1/2 
t
t

Furthermore, the finite volume method is preferable to other methods as a result of the

fact that boundary conditions can be applied noninvasively. Finite volume methods are

especially powerful on coarse non-uniform grids and in calculations where the mesh moves to

track interfaces or shocks (Weisstein, 2018).

A finite volume solver for turbulent shallow water equations is presented on

“Mathematical modeling of a river stream based on a shallow water approach” by

Churuksaeva and Starchenko (2015). The applicability of the model was investigated thus,

comparing between the numerical solution and experimental results, the depth averaged model

correctly represents flow patterns. (Churuksaeva & Starchenko, 2015).

2.4.3 Finite Element Method

The finite element method (FEM) is a numerical technique for solving problems which

are described by partial differential equations or can be formulated as functional minimization.

A domain of interest is represented as an assembly of finite elements. Approximating functions

in finite elements are determined in terms of nodal values of a physical field which is sought.
A continuous physical problem is transformed into a discretized finite element problem with

unknown nodal values. For a linear problem a system of linear algebraic equations should be

solved. Values inside finite elements can be recovered using nodal values. (Nikishkov, 2004)

2.4.3.1 Weak Form

One of the first steps in FEM is to identify the PDE associated with the physical

phenomenon. The PDE (or differential form) is known as the strong form and the integral form

is known as the weak form. Consider the simple PDE as shown below. The equation is

multiplied by a trial function v(x) on both sides and integrated with the domain

u" x   f x 
(15)
 u"x  x   f x  x 
Now, using integration of parts, the LHS of the above equation can be reduced to

u '  x   x 0   u '  x  ' x    f  x   x 


1
(16)

As it can be seen, the order of continuity required for the unknown function u(x) is

reduced by one. The earlier differential equation required u(x) to be differentiable at least twice

while the integral equation requires it to be differentiable only once. The same is true for multi-

dimensional functions, but the derivatives are replaced by gradients and divergence.

2.4.3.2 Discretization

Once the integral or weak form has been set up, the next step is the discretization of the

weak form. The integral form needs to be solved numerically and hence the integration is

converted to a summation that can be calculated numerically. In addition, one of the primary

goals of discretization is also to convert the integral form to a set of matrix equations that can

be solved using well-known theories of matrix algebra. The unknown functional u(x) are

calculated at the nodal points. Interpolation functions are defined for each element to

interpolate, for values inside the element, using nodal values. These interpolation functions are
also often referred to as shape or ansatz functions. Thus the unknown functional u(x) can be

reduced to

nen
u x    N i u i (17)
n 1

where nen is the number of nodes in the element, Ni and ui are the interpolation function and

unknowns associated with node i, respectively.

2.4.3.3 Solvers

Once the matrix equations have been established, the equations are passed on to a solver

to solve the system of equations. Depending on the type of problem, direct or iterative solvers

are generally used.

2.5 Mathematical Model

Mathematical model is a device used to translate or described how the object of interests

behaves into a language of mathematics. Mathematical modeling aims to describe the different

aspects of the real world, their interaction, and their dynamics through mathematics

(Quarteroni, 2009). According Glenn Marion, mathematical modelling can be used to develop

scientific understanding through qualitative expression of current knowledge of a system.

Marion added that mathematical modelling can helped in testing the effect of changes in a

system and aid decision making.

Mathematical model can be classified as empirical and mechanistic. Empirical models

define a mathematical relationship between quantities in a data set. These are obtained from

the general appearance of a data set without regard for underlying biological ideas. Mechanistic

models attempt to show how certain quantities in a data set are causally linked to other

quantities, independent of any links suggested by data (Ledder, 2015).

The second important distinction between different models is whether the model is

deterministic or stochastic. In deterministic models, the evolution of the system is completely


determined by the initial (starting) value of the model. In contrast, stochastic models allow for

randomness—they are well-suited to describe processes that are not well defined and the model

variables’ values are defined by their probability distribution rather than a unique value

(Livshits & Coleman, 2008). The four categories of models implied by the above method

classification are:

Table 7: Categories of Model (Marion, 2008).


Empirical Mechanistic
Deterministic Predicting cattle growth from a Planetary motion, based on
regression relationship with feed Newtonian mechanics (differential
intake equations)
Stochastic Analysis of variance of variety Genetics of small populations
yields over sites and years based on Mendelian inheritance
(probabilistic equations)

2.5.1 Formulation of Water Quality Model

The mathematical model of the stream water quality (Sileika, 1996) is based on the

solution of the mass balance equation expressed for particular pollution parameter along the

selected stream. The effect of reservoir on pollution was expressed by regression equations

obtained from the simplified evaluation of the long-term monitoring at upstream and

downstream of the reservoirs (Ruzgiene & Ruzgas, 2014).

Water quality models can range from a zero-dimensional model to a three-dimensional

representation. Zero-dimensional models are used to estimate spatially averaged pollutant

concentration at minimum cost and this model cannot predict the fluid dynamic of the system.

For one-dimensional models, the system geometry was formulated conceptually as a linear

network or segments or volumes section. One-dimensional models are used mostly in the

formulation of models of river water quality by only simulating longitudinal differences in the
river. Also, lakes and estuaries uses two- or three- dimensional models in order to represent the

spatial heterogeneity of the water bodies (Bowie, et al., 1985).

According to (Loucks & Beek, 2005), a water quality model can be applied to describe

the main water quality process for different types of water system such as streams, rivers, lakes

reservoirs, estuaries, coastal waters and oceans.

2.5.1.1 Mass-Balance Principles

According to (Mirbaghery, Abaspour, & Zamani, 2009) model formulation is based on

the mass balance for particular substance. The statement of the mass balance is given as:

Accumulati on  inflow  outflow  sources or sinks

Model According to (Loucks & Beek, 2005), components of mass balance include:

first, changes by transport (Tr) into and out of the segment; second, changes by physical or

chemical processes (P) occurring wthin the segment; and third, changes by sources/discharges

to or from the segment (S).

t  t  M i   M i   M i  (18)
 M i  t    t    t  
t
Mi
 t  Tr  t  P  t  S

The changes by transport include both advective and dispersive transport which are:

2.5.1.1.1 Advective transport

Advective transport, TXoA ( M / T ) of a constituent at a site X0 is the product of the average

 
water velocity, v Xo L / T  , at that site, the surface or cross-sectional area , A L , through
2

which advection takes place at that site and the average concentration, C Xo M / L3 , of the

constituent
A
TXo  v Xo  A  C Xo (19)

The advection transport depends on water velocity. The water moving with velocity vx

transports the particles of pollutants through the elementary area y and z. The pollutant mass
crossing the area during the time interval t and concentration C is quantified as (Benedini &

Tsakiris, 2013):

M  Cyzv x t (20)

2.5.1.1.2 Dispersive transport

The dispersive transport, T Xo


D
M / T  , across a surface area is assumed to be

C
proportional to the concentration gradient , at site Xo times the surface area A. Letting
x X  Xo

 
D Xo L2 / T , be the dispersion or diffusion coefficient at site x.

C
TXoD   DXo  A  (21)
x X  Xo

A physically meaningful mathematical description of diffusion is the Fick’s law.

Variability of concentration in the water causes a dispersion (Benedini & Tsakiris, 2013). The

mass crossing the area is:

C
J x yzt  ( E ) x yzt (22)
x

2.5.1.1.3 Mass Transport by Advection and Dispersion

According to (Loucks & Beek, 2005), if the advective and dispersive terms are added

and the terms at a second surface at site X o  x are included. A one dimensional equation

results:

t  t  C C 
 M i  t   v XoC Xo  v Xo v C Xo  v  D Xo  D Xo v   A (23)
t
Mi
 x Xo x Xo v 

Where Q Xo L3 / M is the flow site Xo


In the study of (Hussain, Atshan, & Najam, 2012), it was presented a simple

mathematical model for river pollution. The model consist of a pair of coupled reaction

advection-diffusion equations for pollutant and dissolved oxygen.

 APS x, t    APS x, t  APS x, t 


   Z  PS x, t dx (24)
t x 2 x

 AX S x, t   2  APS x, t  AX S x, t 


 DX     S  X S x, t  (25)
t x 2 x

The equations above account expansion of the pollutant and the dissolved oxygen

concentrations. In which they assumed that the river (Shat Al-Diwanya in Iraq) has a uniform

cross-sectional area. In the study, the simplified case by analytical steady state solution for the

zero dispersion and it was found out that the concentration of pollution and dissolved oxygen

level remain within the critical value of these parameters and approximately consistent with

the values that measured for different stations of AL-Diwaniya city.

Another study approach used by (Ani E. C., 2010) was the Fickian advection-dispersion

based on the convective-diffusive mass transport in running waters as shown in the equation

below.

C  CV X    C 
   DX   S s  St (26)
t x x  x 

Based on the study, two kinds of model namely were used (1) numerical models,

employing the PDE itself (one-dimensional advective-dispersion equation), implemented in

COMSOL Multiphysics and (2) analytical models, employing the analytical solutions of ADE

(advective-dispersion equation), implemented in MATLAB®.

2.5.1.1.4 Formulation of Temperature Model

The advection-diffusion model with sink source terms to prevent physical processes

(Herb & Heinz , 2008):


T  T T    T T    T T  H
  u v    D xx  D xy    D yx  D yy   0 (27)
t  x y  x  x y  y  t y  Pc p

Where:

t = time c p = heat transfer coefficient (kJ/s)

( x, y ) = coordinates  = water density (kg/m3)

T = water temperature D xx , D yy =Diffusion coefficient

P = depth (m) u, v = velocity components

Equation (27) includes a global, source/sink heat term H . The Net Heat Exchanges

(W/m2) are expressed as follows:

H  H ns  H na  H bed  H br  H e  H c (28)

Where:

H ns = net solar radiation energy water surface

H na = net atmospheric radiation entering the water surface

H br = heat loss by back radiation from stream

H e = evaporative heat loss at water surface

H c = conductive heat loss at water stream

H bed = heat flux into stream at channel bed

The net solar radiation is computed (Hauser and Schohl, 2003):

H ns  H sm Rs (29)

Where:

H sm = measured solar radiation (shade free solar radiation at the water)

Rs = terrain and vegetation shading factor


Rs  Rsm if xn  B(shade free)

Rs  0.2 if xn  B  W (full shade)

B  W  xn x B
Rs  Rsm  0.2 n if B  xn  B  W (partial shade)
W W

Rsm  shade free reflection factor and can be calculated using

Rsm  1  a(57.4 )  b (30)

Where:

 = solar altitude (radian)

W = width of the stream cross-section

B = distance from trees to water edge

H b cos 
xn  = normal distance from trees to shadow edge
tan 

90
 = angle between sun and stream axis normal in radian
57.3

Azs = river azimuth, clockwise from north to direction of flow in degree

sin  sin   sin 


cos Azs    = sun azimuth in radians
cos  cos 

Table 8: Coefficients of Solar Radiation Reflection


Cloud Cover a b
0 - 0.05 1.18 0.77
0.05 - 0.5 2.20 0.97
0.5 - 0.92 0.95 0.75
0.92 - 1.0 0.35 0.45

The solar altitude ( ) is computed assuming a spherical geometry (Huber and Harleman, 1968):

sin(  )  sin(  ) sin(  )  cos( ) cos( ) cos( h) (31)

Where:

 = site altitude (radians)


 = sun declination (between sun and equator in radians)

h = sun hour angle

If solar radiation is not measured, it can be computed using semi-empirical

relationships. The approach follows Huber and Harleman (1968) is described in detail by Lai,

et. Al. (2004):

The Net Long-Wave Radiation emitted by the atmosphere is computed as:

H na  5.16432 x 13 (1  0.17C 2 )(Ta  274.16) 6 (32)

Where:

3
 S 5
C  1   = cloud cover
 S0 

Ta = dry bulb air temperature (C )

The outgoing black-body radiation emitted from water surface is a function only of the

water temperature, and it is given by (Huber and Harleman, 1968):

H br   w (Tw  273.16) 4 (33)

Where:

Tw = water surface temperature

 w = emissivity = 0.97

  5.672e  8 W/m 2 / K 4

The evaporative heat loss is computed by:

(34)
H e   w L(a1  b1Wa )( Es  Ea )

Where:

L  (597  0.57Tw ) * 4184 = Latent Heat (J/kg)

Tw = water temperature (C)


a1  0 to 4.0x10 -9

b1  1x10 9 to 3x10 -9

  4157 
Ea  2.171x108 exp   = saturated vapor pressure [mb]
 Td  239.09 

Td = dew point temperature in Celsius

E s   j   j Tw = saturated vapor pressure at coefficient in Table 2.

Table 9: Coefficients to Compute Saturation Vapor Pressure


T j j j
0–5 1 6.05 0.522
5 – 10 2 5.10 0.710
10 – 15 3 2.65 0.954
15 – 20 4 -2.04 1.265
20 – 25 5 -9.94 1.659
25 – 30 6 -22.29 2.151
30 – 35 7 -40.63 2.761
35 - 40 8 -66.90 3.511

The conductive heat loss in:

H c   w La1  b1Wa   0.61x10 3  P(Tw  Ta ) (35)

Where:

P = air barometric pressure in mb

For the calculation of heat flux into stream at channel bed the following equation is used:

(Tw  Tb )
H bed   K b (36)
t

Where:

Tb = river bed temperature K b = Thermal conduction coefficient

2.5.1.1.5 Formulation of Dissolved Oxygen Model

The general mass balance equation for the dissolved oxygen in a segment with all the

sources and sins can be presented as (Ali & Husnain , 2010):


dC
V  reaeration  oxidation of CBOD - oxidation NBOD - sediment oxygen deman(SOD) 
dt
photosynthesis - respiratio n - oxygen transport by advection

The mathematical form can also be written as;

C
 k aV C s  C   Vk d L  Vk n Ln  VS  PV  RV  u
dC
V V (37)
dt x

Equation 1 can also be expressed in 2-dimensional mathematical form, the model becomes:

C C 2
 k aV C s  C   Vk d L  Vk n Ln  VS  PV  RV  u
dC
V V u 2 V (38)
dt x y

Where:

C s = DO concentration at saturation C = actual DO concentration

k d = CBOD deoxygenation rate coefficient Ln = NBOD concentration

kn = nitrogenous deoxygenation rate coefficients L = CBOD concentration

P = photosynthesis of aquatic plants R = respiration of aquatic plants

S = sediment oxygen demand u = river velocity

x, y = horizontal and vertical distance in the river

Assuming that the volume “V” along the river is constant, hence

C C 2
 k a C s  C   Vk d L  Vk n Ln  S  P  R  u
dC (39)
u 2
dt x y

Equation 38 and 39 represent the change in concentration of dissolved oxygen with

time at a given location and variation along distance. At steady state, the change in

concentration at a given point with respect to time is zero (Haider & Ali, 2010), Equation 39

becomes;
C C 2
0  k a C s  C   k d L  k n Ln  S  P  R  u u 2 (40)
x y

Or

C C 2
u  u 2  k a C s  C   k d L  k n Ln  S  P  R (41)
x y

Since all the processes in dissolved oxygen do not occur simultaneously in a river

(Haider & Ali, 2010) , photosynthesis and respiration are not expected due to high turbidity,

sediment oxygen demand is not an important parameters as sediments are frequently wash

away with floods.

The deoxygenation through CBOD and reaeration is only consider in the model since

it is the only source of oxygen in the Pinacanauan River. Therefore, Equation 5 will become;

C C 2
u  u 2  k a C s  C   k d L (42)
x y

2.6 MATLAB®

In 1970’s, Cleve Moler developed MATLAB®. The name MATLAB® stands for

MATrix LABoratory and it was written originally to provide easy access to matrix software

developed by the LINPACK (linear system package) and EISPACK (Eigen system package)

projects (Houcque, 2005). MATLAB® is a software package that lets you do mathematics and

computation, analyze data, develop algorithms, do simulation and modelling and produce

graphical displays and graphical user interfaces (Knight, 2000). Simulink is a MATLAB®

extension that has been adopted in other fields of engineering as a means for modeling and

simulating complex systems without the need to write thousands of lines of computer code

during model development. Simulink models can be easily integrated to read and write data

from the workspace and to interact with scripts written with its own high-level programming
language. Simulink has been utilized previously to model the dynamics of engineered systems

in a variety of disciplines (Bowen, Perry, & Bell, 2014).

Compared to conventional computer languages like FORTRAN, MATLAB® has many

advantages for solving technical problems. It is an interactive system whose basic data element

is an array that does not require dimensioning. The software package is now considered as a

standard tool at most universities and industries worldwide (Houcque, 2005).

Examples of Simulink’s use in non-environmental systems analysis include process

modeling in the sugar industry and building systems modeling. In the area of environmental

engineering, Simulink has been used for simulating wastewater treatment plants, either as

individual unit processes, as benchmark simulations of an entire wastewater treatment plant,

for simulation of storm water systems or for integrated models that include both engineered

and natural surface water systems. Simulink has also been used to model the hydrodynamics

and water quality of a few surface water natural systems (Bowen, Perry, & Bell, 2014).

2.6.1 Water Quality Modelling in MATLAB®

Complex modelling closer to the end-user and the decision-maker is what the

integration of GIS (Geographic Information Systems) and MATLAB® brings. The hydrologist

modelling in MATLAB® benefits from presentation and accessibility through ArcView while

the GIS expert benefits from the powerful calculation, visualization and animation options

offered by MATLAB® (Raterman, Schaars, & Griffioen, 2000).

According to (Mulla & Bhosale, 2016), MATLAB® is an interactive software that

allows implementation of algorithm, graphics and creation of interface with other computer

languages. In their report, they described how MATLAB® programming tool can be used for

prediction of water quality in river. They conclude that this programming tool helps to predict

future water quality using present data and helps to save time, manpower and other cost for

continuous analysis.
In the study of (Bowen, Perry, & Bell, 2014), a storm water runoff model based on the

Soil Conservation Services (SCS) method and a finite-volume based water quality model has

been developed to investigate the use of Simulink for use in teaching and research. A

graphically based model development environment for system modeling and simulation is

called the Simulink in which it is a MATLAB® extension that is widely used for mechanical

and electrical systems. In addition, their paper talked also about the benefits for water quality

model in teaching and research. A finite volume, multi-layer pond model using the water

quality kinetics present in CE-QUAL-W2 has been developed using Simulink. The model is

one of the first uses of Simulink for modeling eutrophication dynamics in stratified natural

systems.

According to (Skorzinski, Shacham, & Brauner, 2009), Simulation programs are widely

used in engineering education for numerical, model-based and virtual experimentation,

analysis of cause-effect relationships in complex systems and visualization of challenging

concepts. In their study, they developed a pollutant dispersion simulation program applicable

in environmental education in which MATLAB® is where the simulation models are

implemented and the user interface is provided in the form of a MATLAB GUI. They also

discussed about three types of simulations namely the use of the oxygen sag model to predict

oxygen concentration and deficit of the river, prediction of pollutant dispersion in air from a

continuous point source using the Gaussian model and prediction of pollutant dispersion in

groundwater from continuous point source.

In the modeling of river water quality parameters, the study of (Dawood, Hussain, &

Hassan, 2016) employed the Artificial Neural Network Model to predict the water quality

parameters in Shatt Al Arab River. Based on their study Artificial Neural Networks (ANNs)

are a form of artificial intelligence whose paradigm architecture is inspired by the way

biological nervous systems such as the brain. Moreover an ANNs was built, trained and
implemented using MATLAB neural toolbox using back propagation with Levenberg-

Marquardt algorithm. The results prove the ability of the Neural Network models to predict

very well the monthly values of electric conductivity and turbidity. They also concluded that

Neural Network models can be used for the prediction of eater quality parameters.

2.7 Theoretical Framework

Goals and Objectives

Conceptualization

Sensitivity Analysis
Selection of model
type

Computational
Representation

First Calibration and


sample Verification
field data
set
Second and
additional Validation
field data
sets
Application

Figure 2: Theoretical Framework of the Study (UNESCO.org, n.d.)


According to (Orlob, et al., 1983), the first step of the modeling procedure is

conceptualization. One of its importance is to know the locations of control structures and

tributaries along a river, or to know whether various portions of a lake can be considered

essentially deep or shallow. Conceptualization will involve a choice regarding the possible
(spatial) segregation of the water body into a number of discrete segments and layers. Besides

a spatial separation of the water body it may be necessary to include a grouping and

differentiation of biotic species according to how one visualizes their roles in the ecology of

the water body.

With the conceptualization of the modelling problem comes also model formulation. It

is useful to distinguish between various types of model and to discuss briefly their

characteristics. Formulation of the model according to (UNESCO.org, n.d.) involves a decision

about the type of model, elimination of the relationships that do not affect the output results,

examination of alternative types of models and careful relationships of base data collection.

This information is integrated into a conceptual model, in general through the introduction of

simplifying assumptions and qualitative interpretations regarding the flow and the transport

process.

Computational representation includes formulation of equations, formulation of

methods of solution, and selection of a computer code. In formulation of equations, it is

possible to state the relationships involved in some formal mathematical or statistical way.

Adoption of a hierarchical approach to this process often results in a clearer set of equations in

which the influence of primary and secondary relations can be more easily appreciated. Some

preliminary data may be needed to guide the choice. For the formulation of methods of solution,

only in a few special cases it may be possible to solve the equations analytically, but most

models involve the use of numerical methods for solving partial differential equations,

interpolation, etc. The choice of the appropriate numerical technique is crucial for numerical

stability and accuracy and also for minimizing computational effort. For selection of a

computer code, the decision depends on the project goals. If a modelling is intended only to

provide a first approximation, a simple code may be appropriate. The form of input and output

results, and the choice of the language, are in dependence of the available facilities.
The calibration of the model is one of the most critical, difficult, and valuable steps in

the model application process. After a pollutant transport model is calibrated to a satisfactory

degree, it is often applied to predict and simulate the future contaminant migration.

(UNESCO.org, n.d.) Calibration includes experimental design, model structure identification,

parameter estimation, and verification. Model structure identification begins by identifying the

large subdivisions of a model and proceeds by fitting these together in diagrammatic form with

a flow chart. It is better the model to be created from different modules (separated parts) and

every part to be developed, tested and calibrated apart. Parameter estimation deals with the

computation of values for the parameters that appear in the model equations, once the structure

of these relationships has been properly identified. Verification is the determination of whether

the correct model has been obtained from a given single set of experimental data. Calibration

and verification represent the bulk of the procedure for model development and testing, once

an experimental data set has been obtained (Orlob, et al., 1983).

Validation of the model refers to the testing of the adequacy of the model against a

second, independent set of field data. Because validation thus entails the design and

implementation of new experiments, it is unfortunately a step in the analysis that is all too

rarely attempted (Orlob, et al., 1983).

According to (UNESCO.org, n.d.), it is impossible to apply the model as representative

without suitable proof. The validation of the model depends on the local possibilities. Model

validation, evaluation, confirmation, or testing is the process of assessing the degree of

reliability of the calibrated model using one or more independent data sets. Ideally it is possible

to compare the output results from the model with the observed data.

Sensitivity analysis establishes the relative magnitudes of changes in the simulated

model output responses to changes in the model parameter values. It examines the distribution
of model responses that are possible, given the distributions of estimated parameter values

(Orlob, et al., 1983).

Sensitivity analysis is used before and after calibration mainly to test the responsiveness

and sensitivity of the numerical model to every input parameter. It is useful for: examining the

likely uncertainty in simulation results due to uncertainty in model input parameters, and

examining how well parameters are likely to be estimated from the available data for model

calibration. Sensitivity analysis provides important information on how uncertainties in the

model parameters affect the model results. If the model results are highly sensitive to a

particular parameter, the uncertainty associated with that parameter will significantly affect the

ability of the model to make meaningful interpretations and predictions. It is the mean of

determining the model parameters (UNESCO.org, n.d.).

2.8 Conceptual Framework

Figure 3, shows the conceptual framework of the study. The framework is divided into

three major parts- segmentation of Pinacanauan River, data collection, and water quality model.

The segmentation of Pinacanauan River is based on the location of the source and setting

boundaries within the river reaches. Different parameters such as dissolved oxygen,

temperature and pH were collected. A water quality model is then developed.


SEGMENTATION OF PINACANAUAN RIVER

- Location of Waste Inputs (Source)


River Reaches
- Location of Boundaries

DATA COLLECTION

Water Quality Parameters


- Dissolved Oxygen (DO)
- Temperature
-pH

River Geometry
- Length -Velocity
- Width - Depth

WATER QUALITY MODEL

Two-Dimensional Model
- DO model
Field Data - Temperature model
- DO - pH model
- Temperature
- pH

Validation
Model Output
of Model

Figure 3: Conceptual Framework of the Study


CHAPTER 3

METHODOLOGY

3.1 Initial and Boundary Conditions

The selected length and width of the rivers’ boundary are 200m and 121m, respectively.

If the concentration at each boundary of the river are known at the beginning of the simulation

period, they can be used as initial conditions, and the concentration of constituents in the other

application can be calculated.

Since the ratio ∆x/∆t in the numerical scheme should be approximately equal to the

current velocity of water in the prototype, constituents will travel a distance x in a time interval

t. This is true only if advection operates the downstream boundary condition can be given

approximately by cin  cin11 where cin11 is the concentration just downstream from the end of

the system.
Source 1

Source 2

B4 B3 B2

B5 I1 I2 I3 B1 121 m.

B6 B7
200 m.
50 m. 50 m.
1 m. 1 m.
Figure 4: Selection of Boundary
3.2 Data Gathering

The number of boundaries, rate of flow, velocity, and the cross-section area were

determined. The number of reaches were identified and each reach was divided into several

computation elements, having their own hydraulic, physical and chemical characteristics. The

input data for model validation were topographical and hydraulic data and water quality in the

sampling site. Topographical data were river cross-section that was measured at all sampling

boundaries. Required hydraulic data are flow rates, water depth and velocity. River branches

between the stations was inputted to the model as an incremental flow. The temperature, DO

and pH at each boundary were measured on site.

The main data required for this model are as follows:

 Length , width and height of the river

 Number and location of boundaries

 Length between each boundaries

 Temperature, pH and DO at each boundaries

 Location of the intersection point of the sewage and the main river Commented [MJC4]: How about the hydraulic data? Are
they considered secondary (from your statement “main
data required”)? If it is the case, what is the impact of the
3.3 Model Formulation secondary data on your model equation?
Commented [R5R4]:
Model formulation is based on the mass balance for particular substance. The statement

of the mass balance is given as:

Accumulation  inflow - outflow  sources or sinks

The mathematical model consists of two-dimensional advection-dispersion mass

balance equation of the given pollution parameter, corresponding, initial and boundary

conditions.
3.3.1 Discretization of DO Model

The formulated model for dissolved oxygen is:

C C  2C
 k a C s  C   k d L  u u 2
t x y

Where:

C s = concentration of dissolved oxygen at saturation

C = actual concentration of dissolved oxygen

C
0
t

C  2C
0  k a C s  C   k d L  u u 2
x y

 C  2C 
0  k a Cs  C   k d L  u  2 
 x y 

 Ci 1, j  Ci 1, j Ci , j 1  2Ci , j  Ci , j 1 


0  k a Cs  Ci , j   k d L  u  
 x y 2 

Let x  y


0  x2ka Cs  Ci , j   x2kd L  u xCi 1, j  Ci 1, j   Ci , j 1  2Ci , j  Ci , j 1 
0  x2ka Cs  Ci , j   x2kd L  uxCi 1, j  Ci1, j   uCi , j 1  2uCi , j  uCi , j 1

2uCi , j  x2kaCs  x2kaCi , j  x2kd L  uxCi 1, j  Ci 1, j   uCi , j 1  uCi , j 1

2uCi , j  x 2 kaCi , j  x 2 kaCs  x 2 kd L  uxCi1, j  Ci1, j   uCi , j1  uCi , j1

2u  x k C   x k C
2
a i, j
2
a s  x2kd L  uxCi 1, j  Ci 1, j   uCi , j 1  uCi , j 1

x 2 kaCs  x 2 kd L  uxCi 1, j  Ci 1, j   uCi , j 1  uCi , j 1


Ci. j 
2u  x 2 ka

3.3.2 Discretization of Temperature

The advection-dispersion model with sink or source terms to prevent physical

processes:
T  T T    T T    T T  H
  u V    Dxx _ Dxy    D yx _ D yy  0
t  x y  x  x y  y  x y  PCp

Neglecting the diffusion coefficients D and the global, source/sink heat term H ,

hence the equation becomes:

T  T T    T T    T T 
 u            0
t  x y  x  x y  y  x y 
Discretizing the model, it becomes

 Ti 1, j  Ti 1, j   Ti , j 1   Ti 1, j  2Ti , j  Ti 1, j  1  Ti , j 1  Ti , j 1   Ti , j 1  2Ti , j  Ti , j 1 


u                0
 x   y   x 2  x  y   y 2 

uxTi 1, j  Ti 1, j  Ti , j 1  Ti , j 1   Ti 1, j  2Ti , j  Ti 1, j  Ti , j 1  Ti , j 1  Ti , j 1  2Ti , j  Ti , j 1  0

Let x  y  0

 UxTi1, j  Ti1, j  Ti , j 1  Ti , j 1   Ti1, j  Ti1, j  Ti , j 1  Ti , j 1


Ti , j 
2

3.3.3 Discretization of pH Model

C C C  C    C 
 u v  x    y 0 
t x y  x  y  y 
C C  C    C 
0  u v  x    y 
x y  x  y  y 
 C C    C    C 
0  u      x    y 
 x y  x  x  y  x 
 Ci 1, j  Ci 1, j   Ci , j 1  Ci , j 1    Ci 1, j  2Ci , j  Ci 1, j   Ci , j 1  2Ci , j  Ci , j 1 
0  u      x   y  ; x  x  1
  x    y    x 2
  y 2 
0  u  Ci 1, j  Ci 1, j    Ci , j 1  Ci , j 1     x  Ci 1, j  2Ci , j  Ci 1, j    y  Ci , j 1  2Ci , j  Ci , j 1 

0  u  Ci 1, j  Ci 1, j    Ci , j 1  Ci , j 1    Ci 1, j  2Ci , j  Ci 1, j  Ci , j 1  2Ci , j  Ci , j 1

0  u  Ci 1, j  Ci 1, j    Ci , j 1  Ci , j 1    Ci 1, j  Ci 1, j  Ci , j 1  4Ci , j  Ci , j 1

0  u  Ci 1, j  Ci 1, j    Ci , j 1  Ci , j 1    Ci 1, j  Ci 1, j  Ci , j 1  Ci , j 1


Ci , j 
4
3.4 Estimation and Calibration of Reaeration and Decay Rate Coefficient

Reaeration and decay rates are very important parameters in order to predict the

dissolved oxygen concentration in the river (Gonçalves, Silveira, Lopes Júnior, da Luz , &

Simões, 2017). Estimating reaeration and decay rate coefficient requires considerable efforts

since measuring these coefficients is laborious and expensive task. Hence, the coefficients used

in this study were estimated using developed equation. For the estimation of reaerations rates,

M. A. Churchill, H. L. Elmore and R. A. Buckingham's equation (1962) was used.

5V
k a (20C ) 
h5 / 3

where:

ka = reaeration rate at 20°C (/day)

V = mean velocity (m/s)

h = mean depth (m)

The calculated ka (20C ) were calibrated according to stream temperature using the formula:

k a  k a (20C ) x (T  20)

The temperature correction coefficient, θ, depends on the mixing condition of the river water

body. Values generally range from 1.005 to 1.030. In practice, a value of 1.024 is often used

(Thomann and Mueller, 1987).

Decay rate coefficients is also dependent on temperature. The formula for estimating

decay rate coefficient is

k d  k d (20C ) x (T  20)

where θ is 1.047. The typical value at the reference temperature 20 °C is commonly estimated

using the table below


Waste Type Kd at 20 (day-1)
Raw domestic sewage 0.35-0.70
Treated domestic sewage 0.12-0.23
Polluted river water 0.12-0.23
Table 10: Typical values of the decay coefficient for various types of wastes. From [Davis

and Cornwell, 1991]

3.5 Solution Scheme

An implicit finite difference scheme is to be used for the numerical solution of the

advection-diffusion equation. In this method the finite difference approximation will express

the values and the partial derivative of each function within a four point grid formed by the

intersections of the space line i-1, I and i+1 with the time lines tn and tn+1. A control volume is

will be defined and situated around the grid point i. The boundaries of this control volume are

river bed, the water surface and the two cross-sections situated at i-1 and i+1, respectively, as

shown in the figure.

For a discrete time interval change in Δt, beginning at tn and collecting term in

concentration (C), the resulting finite difference form is:

M  Dp M  Dp M
2 2

p  
t x 2
y 2
M (N wi , N Li , t + 1) M (N wi , N Li , t ) M (N wi+1 , N Li , t + 1) 2M (N wi , N Li , t + 1) + M (N wi 1 , N Li , t + 1)
ρp = +
Δt Δx 2

(
M (N w , N Li+1 , t + 1) 2M (N wi , N Li , t + 1) + M N wi , N Li +1 , t + 1 )
Δy 2

M (i, j, t + 1) M (i, j, t ) M (i + 1, j, t + 1) 2M (i, j, t + 1) + M (i 1, j, t + 1)


ρp = Dρ p
Δt Δx 2

M (i, j + 1, t + 1) 2M (i, j, t + 1) + M (i, j 1, t + 1)


+
Δy 2

M(i, j, t + 1) M(i, j, t ) Dρ p
= [M(i + 1, j, t + 1) 4M(i, j, t + 1) + M(i 1, j, t + 1)]
Δt ρ p Δx 2

+ M(i, j + 1, t + 1) + M(i, j 1, t + 1)

M (i, j, t + 1) Dρ p Dρ p
+ 4M (i, j, t + 1) = [M(i + 1, j, t + 1) + M(i 1, j, t + 1)]
Δt ρ p Δx 2 ρ p Δx 2

M (i, j, t )
+ M (i, j + 1, t + 1) + M (i, j 1, t + 1) +
Δt

1 4Dρ p Dρ p
+ M (i, j, t + 1) = [M (i + 1, j, t + 1) + M (i 1, j, t + 1) + M (i, j + 1, t + 1)
Δt ρ p Δx 2 ρ p Δx 2

M (i, j, t )
+ M (i, j 1, t + 1)] +
Δt

3.6 Model Calibration and Validation

Once the model was configured, model testing was performed. First, calibration is done

for one period with adequate available field data. The calibrated model is then used to simulate

an independent period for which field data under different environmental conditions are

available for comparison and validation. Results of the validation run are then compared with

field data for the same period, and a decision is made as to whether predictions and observations

are close enough to consider the model valid for predictive purposes and this is done using the

t-test in Microsoft Excel 2016. If validation results are not adequately close, the model process

controlling parameters are adjusted accordingly, and the calibration and validation process is
repeated. This is done iteratively until the results are adequate to consider the model valid for

predictive purposes. In this study, the paired sample t-test was used to validate whether the

actual and theoretical values has no significant difference.

I do hope to see your data. Can I be a guest panel member?