Professional Documents
Culture Documents
TUGUEGARAO RIVER
Submitted by:
Guillermo, Denver V.
Mamba, Rhea D.
Maligod, Laica C.
Maruquin, Elha E.
Table of Contents
Chapter 1 ............................................................................................................................................... 4
INTRODUCTION................................................................................................................................. 4
Chapter 2 ............................................................................................................................................... 8
2.6 MATLAB®................................................................................................................................. 31
3.5 Initial and boundary condition .................................................... Error! Bookmark not defined.
INTRODUCTION
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
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
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).
means of a mathematical model in order to determine the condition of the river water and
formulate solutions.
The study focuses on the water quality modelling of Pinacanauan de Tuguegarao River.
2. Can the developed model be used as an evaluation technique in analyzing water quality
Tuguegarao River?
3. Is the simulated values of water quality parameters have acceptable compatibility with
Generally, the study aimed to develop a water quality model of the Pinacanauan de
Tuguegarao River.
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
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
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
The mathematical model developed could be used to predict water quality parameters.
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
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.
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.
Diffusion - is the process by which both ionic and molecular species dissolved in water move
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
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.
logarithmic scale.
Pollution Load - amount of pollutant being discharged into the environment; the product of
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
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,
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
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
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
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
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.
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
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
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
The law of conservation of mass states that mass is neither created nor destroyed. It is
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
Adolf Fick stated that the molar flux due to diffusion is proportional to the
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
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
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
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
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
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.
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
Heat transfer from systems of high temperature to systems of lower temperature (Nave,
T T T 2T 2T 2T T
v x vy vz DT 2 _ 2 2 (7)
x y z x x x t
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 ( n1) ( xo )
U ( xo h) U ( xo ) hU x ( xo ) h 2 .... h n1 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
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.
O(h n ) is defined as
f (h)
lim C (9)
h 0 hn
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.
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
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
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.).
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).
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.
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.
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.
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
sediment’s advection at each face of any control volume, by means of a modified form of the
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 SAi SAi Δ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 in1/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)
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
Churuksaeva and Starchenko (2015). The applicability of the model was investigated thus,
comparing between the numerical solution and experimental results, the depth averaged model
The finite element method (FEM) is a numerical technique for solving problems which
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)
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
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
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
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
Marion added that mathematical modelling can helped in testing the effect of changes in a
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
The second important distinction between different models is whether the model is
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:
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
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
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
the mass balance for particular substance. The statement of the mass balance is given as:
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
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:
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 Cyzv x t (20)
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
Variability of concentration in the water causes a dispersion (Benedini & Tsakiris, 2013). The
C
J x yzt ( E ) x yzt (22)
x
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
mathematical model for river pollution. The model consist of a pair of coupled reaction
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
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,
COMSOL Multiphysics and (2) analytical models, employing the analytical solutions of ADE
The advection-diffusion model with sink source terms to prevent physical processes
Where:
Equation (27) includes a global, source/sink heat term H . The Net Heat Exchanges
H H ns H na H bed H br H e H c (28)
Where:
H ns H sm Rs (29)
Where:
B W xn x B
Rs Rsm 0.2 n if B xn B W (partial shade)
W W
Where:
H b cos
xn = normal distance from trees to shadow edge
tan
90
= angle between sun and stream axis normal in radian
57.3
The solar altitude ( ) is computed assuming a spherical geometry (Huber and Harleman, 1968):
Where:
relationships. The approach follows Huber and Harleman (1968) is described in detail by Lai,
Where:
3
S 5
C 1 = cloud cover
S0
The outgoing black-body radiation emitted from water surface is a function only of the
Where:
w = emissivity = 0.97
5.672e 8 W/m 2 / K 4
(34)
H e w L(a1 b1Wa )( Es Ea )
Where:
b1 1x10 9 to 3x10 -9
4157
Ea 2.171x108 exp = saturated vapor pressure [mb]
Td 239.09
Where:
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:
The general mass balance equation for the dissolved oxygen in a segment with all the
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:
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
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
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
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
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
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).
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
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
concepts. In their study, they developed a pollutant dispersion simulation program applicable
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
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.
Conceptualization
Sensitivity Analysis
Selection of model
type
Computational
Representation
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
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
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.
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.
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
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
without suitable proof. The validation of the model depends on the local possibilities. Model
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.
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
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
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
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,
DATA COLLECTION
River Geometry
- Length -Velocity
- Width - Depth
Two-Dimensional Model
- DO model
Field Data - Temperature model
- DO - pH model
- Temperature
- pH
Validation
Model Output
of Model
METHODOLOGY
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
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 cin11 where cin11 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
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
balance equation of the given pollution parameter, corresponding, initial and boundary
conditions.
3.3.1 Discretization of DO Model
C C 2C
k a C s C k d L u u 2
t x y
Where:
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
Let x y
0 x2ka Cs Ci , j x2kd L u xCi 1, j Ci 1, j Ci , j 1 2Ci , j Ci , j 1
0 x2ka Cs Ci , j x2kd L uxCi 1, j Ci1, j uCi , j 1 2uCi , j uCi , j 1
2u x k C x k C
2
a i, j
2
a s x2kd L uxCi 1, j Ci 1, j uCi , j 1 uCi , j 1
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 PCp
Neglecting the diffusion coefficients D and the global, source/sink heat term H ,
T T T T T T T
u 0
t x y x x y y x y
Discretizing the model, it becomes
Let x y 0
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
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,
5V
k a (20C )
h5 / 3
where:
The calculated ka (20C ) were calibrated according to stream temperature using the formula:
k a k a (20C ) 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
Decay rate coefficients is also dependent on temperature. The formula for estimating
k d k d (20C ) x (T 20)
where θ is 1.047. The typical value at the reference temperature 20 °C is commonly estimated
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
For a discrete time interval change in Δt, beginning at tn and collecting term in
M Dp M Dp 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 ) 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
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