Professional Documents
Culture Documents
TUGUEGARAO RIVER
Submitted by:
Guillermo, Denver V.
Mamba, Rhea D.
Manaligod, Laica C.
Maruquin, Elha E.
Abstract
Water quality aspect with regards to temperature, dissolved oxygen and pH of Pinacanauan de
Tuguegarao River, located at Barangay Caggay, Tuguegarao City was studied. The main
objective was to develop a two-dimensional water quality model for each parameter. A 200
meter length and 121 meter width was selected as the boundary. Water samples were collected
from designated points in the boundary for every 14 days and analyzed for different parameters.
Simulated values from the developed models were compared to the measured values using
statistical paired t-test and found no significant difference. Furthermore, the developed models
i
Table of Contents
Abstract ...................................................................................................................................... i
Chapter 1 .................................................................................................................................. 1
INTRODUCTION.................................................................................................................... 1
Chapter 2 .................................................................................................................................. 5
ii
2.5.1 Formulation of Water Quality Model ...................................................................... 16
CHAPTER 3 ........................................................................................................................... 34
METHODOLOGY ................................................................................................................ 34
3.4 Estimation and Calibration of Reaeration and Decay Rate Coefficient ......................... 40
iii
3.6 Simulation Methodology ........................................................................................... 43
CHAPTER 4 ........................................................................................................................... 46
4.4.3 pH ............................................................................................................................ 54
CHAPTER 5 ........................................................................................................................... 57
REFERENCES ....................................................................................................................... 59
APPENDIX A ......................................................................................................................... 67
iv
A.4 Slope of the River .......................................................................................................... 70
APPENDIX B ......................................................................................................................... 72
APPENDIX C ......................................................................................................................... 78
APPENDIX D ......................................................................................................................... 86
v
D.1 Simulation Results......................................................................................................... 86
D.2.3 pH ........................................................................................................................... 96
vi
LISTS OF FIGURES
Figure 1: Theoretical Framework of the Study (Orlob, et al., 1983) ...................................... 29
Figure 7: Theoretical Vs. Actual Temperature for (a) I1 (b) I2 (c) I3. ..................................... 49
Figure 13: First discharge for the chosen boundary. A continuous flowing water coming
Figure 14: Second discharge located upstream. A pipe projected directly to the river coming
from residential houses which produces a dark fluid with an awlful smell. .......................... 103
Figure 15: A photo of the group measuring the width of the river (left side) and the its length
Figure 16: Labelled plastic bottles for the sample collection. From boundary 1 to boundary 7
and inner boundary 1 to inner boundary 3 with two replicates. ........................................... 104
Figure 17: Sample collection from the chosen sampling points. The sampling bottles was
Figure 18: Analysing the samples using chemical test for the parameters pH and DO. Photo
vii
Figure 19: On-site water analysis using the equipment devices (Thermometer, pH meter, and
Figure 20: On-site chemical testing of pH at different sampling points. .............................. 105
Figure 22: Setting up for the Measuring of velocity using a table tennis ball and timer. ..... 106
Figure 23: On-site sampling at the center of the river. ......................................................... 106
Figure 24: Photo taken during the last data collection with the boat owner Lyafayeth Tasi.
................................................................................................................................................ 106
Figure 25: Photo taken at the Laboratory of BFAR with ma'am Divine. ............................. 107
viii
LISTS OF TABLES
Table 1: Monitored Water Quality Parameters per Type of Water Body (DENR-EMB, 2014).
.................................................................................................................................................... 6
Table 2: Number of classified inland surface water bodies (EMB National Water Quality
Table 8: Typical values of the decay coefficient for various types of wastes. From [Davis and
ix
Chapter 1
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
1
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).
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.
1. Is the simulated values of water quality parameters have acceptable compatibility with
2. Can the developed model be used as an evaluation technique in analyzing water quality
Tuguegarao River?
Generally, the study aimed to develop a water quality model of the Pinacanauan de
Tuguegarao River.
1. Compare the difference of the simulated value and the actual values of water quality
2
2. Predict the concentration of the different water quality parameters (dissolved oxygen,
temperature, and pH) of Pinacanauan de Tuguegarao River using the developed model.
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 serve as a forecasting tool for the different
this study were dissolved oxygen, temperature and pH and were gathered On-Site. The
collection of data was from December 20, 2018 to April 28, 2019 with 14 days’ interval.
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.
3
1.7 Definition of Terms
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.
4
Chapter 2
Cagayan Valley. It is also renowned tourism spot in the province. The clear Pinacanauan de
Tuguegarao 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,
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
5
Table 1: Monitored Water Quality Parameters per Type of Water Body (DENR-EMB, 2014).
Table 2: Number of classified inland surface water bodies (EMB National Water Quality
Status Report, 2006)
Classification Definition Number
Waters intended as public water supply
Class AA requiring only approved disinfection to meet the 5
PNSDW.
Waters suitable as water supply requiring
Class A 203
conventional treatment to meet the PNSDW.
Waters intended for primary contact recreation
Class B 149
(e.g. bathing, swimming, skin diving, etc.)
Waters for fishery, recreation/boating, and
Class C supply for manufacturing processes after 231
treatment.
Class D Waters intended for agriculture, irrigation,
23
livestock watering, etc.
6
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
The conservation equations state that what goes into the system must either come out
of the system somewhere else, get used up or generated by the system, or remain in the system
7
Conservation of mass governs law of conservation which states that the mass entering
the system is equal to mass leaving the system. For fluid dynamics, it states that all mass flow
rates into a control volume are equal to all mass flow rates out of the control volume plus the
rate of change of mass within the control volume (Duncan, 2017). This is expressed
m
m in m out (2)
t
Adolf Fick was the first man to propose the phenomenological relation for diffusion.
Fick’s First Law stated that when considering the flux of particles in a one-dimensional
system caused by a concentration gradient (Paul, Laurila, Vuorinen, & Divinski, 2014), the
dm C
J D (3)
dtA x
Where J is the flux, dm is the is the change in the amount of matter in small time dt,
A is the area, D is the diffusion coefficient, C is the concentration of the particles and x is the
position parameter. The negative sign indicates that diffusion occurs in the direction opposite
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
8
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 (4)
x y z x y z t
C C 2 C (5)
vx K I
t t x 2
The equation represents a typical one-dimensional flow that was used to solve mass
9
I = the sink or source term that describes the reaction of the substance with its
environment.
C C C 2 C 2 C
v x vy Kx 2 Ky 2 I (6)
t x y x y
This equation represents a two-dimensional flow which considers both the x and y axis
C C C C 2C 2C 2C
v x vx vx Kx K K I
t z 2
(7)
t t t x 2 y 2
y z
This equation considers the flow in any direction to solve mass transport.
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 (8)
x y z x x x t
The heat content of an object depends upon its specific heat and mass. The Heat
Transfer is the measurement of the thermal energy transferred when an object having a defined
specific heat and mass undergoes a defined temperature change (Heat Transfer Formula, n.d.).
Q = mcpΔT (9)
Where:
m = mass
10
ΔT = change in temperature
2.3.2.3.1 Conduction
equation:
q -kAT (10)
where:
2.3.2.3.2 Convection
q hAs T (11)
where:
11
2.3.2.3.3 Radiation
Radiation heat transfer involves the transfer of heat by electromagnetic radiation that
arises due to the temperature of the body. Radiation does not need matter. Emissive power of
a surface:
E TS W / m 2 (12)
where:
The finite difference method (FDM) is used to approximate differential equation when
it is imposed on the grids or boundary, called boundary-value problems (Kaw, Nguyen, &
Snyder, 2012). FDM is applied to partial differential equation (PDE) by replacing the
approximated dependent variable with the independent variable which are defined by a finite
grid of points. Using Taylor’s theorem, the partial derivatives at each grid points are
Taylor’s Theorem
Let U(x) have n continuous derivatives over the interval a, b . Then for
a x0 , x0 h b ,
U xx ( x o ) U ( n 1 ) ( x o )
U ( x o h ) U ( x o ) hU x ( x o ) h 2 .... h n 1 O( h n ) (13)
2! ( n 1 )!
where,
dU d 2U d n 1U (14)
Ux U xx U ( n 1)
dx dx 2 dx n 1
12
U x ( xo ) is the derivative of U with respect to x evaluated at x xo
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 x o + h. The
n n
expression contains an unknown quantity O(h ) . If the term O(h ) is discarded in the equation
(i.e. truncate the right-hand side of the equation 8), an approximation to U ( x0 h) is observed.
n
The error in this approximation is O(h ) (D.M.Causon & Mingham, 2010).
Finite difference method has two categories based on time differencing scheme:
implicit and explicit. When sets of equations, matrix or iterative technique are used to define
the dependent variables, the numerical method is implicit. Whereas, the explicit numerical
solution scheme for direct computation of the dependent variables needed for the mathematical
modelling and are used when time accuracy is important (Flow-3D, 2019).
time integration methods reduces the computing time with time steps that are large thus, have
less strict stability conditions. Explicit, on contrary needs to obey to strict stability conditions.
Implicit schemes, has smaller computing times however, the accuracy is dependent on time
With the utilization of both implicit and explicit methods by means of dispersion model,
a technique that leads to more practical and applicable water quality model in a flooding stream
13
technique proposed is suitable to be used in real-world problem because of its easy to computer-
The finite element method (FEM) is a numerical technique for solving problems which
are described by PDE to achieve approximate solution. In the form of nodal values of the
physical area, approximation of functions in finite elements which is the interest are
determined. A discretized finite element problem with unknown nodal values is changed from
a continuous physical problem. A system of linear algebraic equations should be solved for
linear problem and in using nodal values, the amounts inside finite elements can be recovered
(Nikishkov, 2004).
2.4.2.1 Discretization
Discretization means converting of continuous PDE into a form that poses a finite
dimensional space also called discrete equation. The process considers the motion taking place
in discrete group, attempting to develop a model that determines the position of the particle at
the nth position. During the procedure, data are collected at specific points or moments in time.
A numerical model is obtained through the discretization of time and space variables in
PDEs on a grid which is later solved in a computer. This numerical approach is considered
cheaper than creating traditional scale models. Moreover, the latter model defies accurate
2.4.2.2 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
14
2.5 Mathematical Model
The aim of Mathematical modeling is to describe the real world, its interaction, and its
dynamics through mathematics (Quarteroni, 2009). It is a tool that could be used to develop
scientific understanding of a system. It can also help in testing the effect of changes in a system
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 on the other hand derive relationship between the variables in the data set. Data
obtained are thought to have arisen due to the nature of the relationship is specified in terms of
evolution are completely determined by its initial (starting) value fall under the deterministic
model. In contrast, stochastic models tolerate randomness; these are most appropriate for
processes that are not well defined and whose model variables’ values are defined by
probability distribution rather than a unique value (Livshits & Coleman, 2008). The table below
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)
15
2.5.1 Formulation of Water Quality Model
The mathematical model of the stream water quality is derived from mass balance
equations of particular pollution parameter along the selected stream (Sileika, 1996).
Regression equations expressing the effect of reservoir on pollution were obtained from the
representation. Zero-dimensional models are for the estimation of spatially averaged pollutant
concentration at minimum cost and cannot predict the fluid dynamic of the system. One-
dimensional models on the other hand are for system’s whose geometry was conceptualized as
a linear network or segments or volumes section. They are formulated by only simulating the
longitudinal differences in the river. For two- or three- dimensional models, the spatial
Water quality models are used to describe the main water quality process for different
types of water system such as streams, rivers, lakes reservoirs, estuaries, coastal waters and
Advective transport A
T Xo ( M / T ) of a constituent at a site X0 is the product of the site’s
average water velocity v Xo L / T and surface or cross-sectional area and the constituent’s
average concentration C Xo M / L3 .
A
TXo v Xo A C Xo (15)
through the elementary area y and z via water moving with velocity vx. The pollutant mass
16
crossing the area during the time interval t and concentration C is given by (Benedini &
Tsakiris, 2013):
M Cyzv x t (16)
C
to the concentration gradient times the surface area A at site Xo. Letting
D Xo L2 / T
x X Xo
C
TXoD DXo A (17)
x X Xo
the Fick’s Law (Benedini & Tsakiris, 2013). The mass crossing the area is:
C
J x yzt ( E ) x yzt (18)
x
A one-dimensional equation added with the advective and dispersive terms along with
t t C C
M i t v XoC Xo v Xo v C Xo v D Xo D Xo v A (19)
t
Mi
x Xo x Xo v
A study presented a simple mathematical model for river pollution. The model
17
APS x, t APS x, t APS x, t
Z PS x, t dx (20)
t x 2 x
Expansion of the pollutant and the dissolved oxygen concentrations were accounted
for. The river (Shat Al-Diwanya in Iraq) was assumed to have a uniform cross-sectional area
with a steady state system for simplification. The result of the model for pollution concentration
and dissolved oxygen level was approximately consistent with the values obtained from those
Another study was conducted to model river pollution using the Fickian advection-
dispersion. This approach was based on the convective-diffusive mass transport in running
C CV X C
DX S s St (22)
t x x x
The study incorporated two kinds of models. The first models were numerical models
implemented in COMSOL Multiphysics. The second ones were the analytical model that
MATLAB®.
The advection-diffusion model with sink source terms to prevent physical processes
T T T T T T T H
u v D xx D xy D yx D yy 0 (23)
t x y x x y y t y Pc p
18
( x, y ) = coordinates = water density (kg/m3)
Equation (23) includes a global, source/sink heat term H . The Net Heat Exchanges
(W/m2) are expressed as follows (Baca & Arnett, 1976) (Edinger, 1979) (Ryan & Harleman,
H H s H sr H a H ar H br H e H c (24)
Where:
The net short wave solar radiation H ns is computed (Ryan & Harleman, 1973):
H ns H s H sr 0.94 H sc 1 0.65SK 2 (25)
Where:
The Net Long-Wave Radiation emitted by the atmosphere is computed as (Swinbank, 1963):
Where:
19
H na = net long wave atmospheric radiation (kW m-2);
The outgoing black-body radiation emitted from water surface is a function only of the water
Where:
Where:
4157
ea 2.171x108 exp = saturated vapor pressure [mb];
Td 239.09
20
Table 6: 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
T Td
Br
Hc
He
6.19 x10 4 p s
e s ea
(29)
Where:
Br = Bowen ratio;
The general mass balance equation for the dissolved oxygen in a segment with all the
dC
V reaeration oxidation of CBOD - oxidation NBOD - sediment oxygen deman(SOD)
dt
photosynthesis - respiratio n - oxygen transport by advection
C C
k aV C s C Vk d L Vk n Ln VS PV RV V
dC
V u V Dx (37)
dt x x
21
C C C C
V k aV C s C Vk d L
dC
V u V v V Dx V D y (30)
dt x y x x y y
Vk n Ln VS PV RV V
Where:
Assuming that the volume “V” along the river is constant, hence
C C C C
k a C s C k d L
dC
u v Dx D y (31)
dt x y x x y y
k n Ln S V V
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 parameter as sediments are frequently wash away
with floods.
The deoxygenation through CBOD and reaeration is only considered in the model since
it is the only source of oxygen in the Pinacanauan River. Therefore, Equation 31 will become;
C C C C
k a C s C k d L
dC
u v Dx D y (32)
dt x y x x y y
22
2.5.4 Formulation of pH Model
The mathematical model for predicting the diffusion of pH was formulated base from
the mass and momentum principle and obtain an ordinary differential equation of (Ukpaka &
Douglas, 2016):
u, v = river velocity;
D y , D x =diffusion coefficients.
The carbon dioxide (CO2) reacts in and with water which provides the acidity of the
river water and the natural rain. CO2 binds with water to form carbonic acid H2CO3 with
subsequent decomposition into the bicarbonate ion HCO3- and a proton H+:
H 2 CO3 HCO3 H
2 (34)
HCO3 CO3 H
H 2 O H OH
Reaeration at the surface of the water body is a function of CO2 saturation level
(source) and this saturation level is a function of water temperature as it affects Henry’s Law
constant
23
Henry’s constant for CO2 can be calculated using
From the reactions above (Eqn. 34), the equilibrium constants are:
k1
HCO H 3
(37)
H 2CO3
k2
CO H 2
(38)
HCO
3
3
k w H OH (39)
The equilibrium constant vary with temperature according to the following relationship
14.84350.032786TK
3404.71
(40)
k1 10 TK
2902.39
6.4980.02379TK (41)
k 2 10 TK
The formulated dissolved oxygen and temperature model were applied for river water
quality modelling of Este and Ave River in Portugal. The coefficient of determination of the
River R2
Temperature Dissolved Oxygen
Este River 0.72 0.67
Ave River 0.77 0.53
24
The pH model was also use in stagnant water in the neighborhood of the Asphalt
Company Nigeria Limited located at Enito 3, a village located between Ahoada and Mbiama
in Ahoada West Local Government Area of River State and the coefficient of determination
A study on a method of water quality improvement (Makita & Saeki, 2006) for
aquaculture purposes was made. During the process, the adjective diffusion equation was used
to calculate the mass diffusion transfer of water in a semi-closed water area. Thus, the value of
the coefficient of horizontal diffusion (Dx) used for the equation was calculated by
Dx cL4 / 3
Where L is the grid size and c is considered constant with a value of 0.01. For vertical
coefficient
D y 0.067 u* H
D y 0.067 H gRh S
H = average height;
Rh = hydraulic radius;
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
25
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
26
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
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
27
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.
28
2.7 Theoretical Framework
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
29
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.
30
parameter estimation, and verification. Model structure identification begins by identifying the
large subdivisions of 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
31
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,
32
SEGMENTATION OF PINACANAUAN DE TUGUEGARAO RIVER
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
33
CHAPTER 3
METHODOLOGY
The study area is located in Brgy. Caggay, Tuguegarao City, Cagayan at the latitude
and longitude of 17° 37’ 37.41” N and 121° 44’ 25.44” E, respectively (Figure 4). It has a total
population of about 7,577 and approximately 25% of its total population resides along the river.
The river has an average depth of 1.56461 m. and an average velocity of 0.30618 m/s. The river
is surrounded by agricultural lands, however there were two pollutant sources were located in
the selected sampling site that impact the water quality of river water (domestic and household
effluents). Also, the nearest distance of the sampling site from the road is 31.8 m while the
furthest is 64.9 m.
34
3.2 Initial and Boundary Conditions
The selected length and width of the rivers’ boundary are 200 m. and 121m.,
respectively. The data were gathered at the outer and inner nodes of the study area. From the
outer nodes, seven points were selected as initial conditions which are denoted as B1 to B7 and
for the inner nodes, three points were selected (I1 to I3). Each point, three parameters were
tested (DO, temperature, and pH). In addition, the location of the upper and lower streams were
identified.
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
35
3.3 Data Collection
Water parameters were measured using two methods: chemical testing method and the
used of measuring devices. The chemical method was used to validate the result of the
measuring devices. The dissolved oxygen, temperature and pH of each point in the boundary
were measured with two replicates. The water sampling was every after 14 days and were
A. Water Collection
The sampling bottles were rinsed with sample water from the river. A bottle was
submerged in the river and the cap was removed. After the bottle was filled with water, the cap
was replaced and the bottle was retrieved from the river. When air bubbles appeared, the
sampling method was repeated until such time that no air bubbles were seen from the sample.
A DO bottle was filled with sample water and added with 8 drops of Manganous Sulfate
Solution (4167). Additional 8 drops of Alkaline Potassium Iodide Azide Solution (7166) was
added to the sample before it was capped, mixed by inverting several times and allowed the
precipitate to settle. Another 8 drops of Sulfuric Acid was added to the sample, capped and
mixed properly until the formed precipitate dissolved. The sample was now “fixed”
A test tube was filled to 20 mL line with “fixed” sample and then capped. The sample
was titrated using Direct Reading Titrator (0377) with Sodium Thiosulfate, 0.025N (4169) until
the color turned to very faint yellow. The titrator was removed and the “fixed” sample was
added with 8 drops of Starch Indicator Solution (4170 WT) where the sample turned blue. The
sample was titrated until the blue color disappeared. Dissolved oxygen was recorded in ppm.
36
C. pH Measurement
A test tube (0106) was filled with 10 mL sample water, added with 8 drops of Wide
Range pH Indicator (2218), capped and properly mixed. The test tube was inserted into a wide
range Octa-Slide 2 Bar (3483-01) and Octa-Slide 2 Viewer and the pH was determined by
comparing the color of the sample with the corresponding color in the Octa-Slide 2 Viewer.
Immerse the DO probe into the solution under test to a depth of at least 10cm. Allow
the test to stabilize for several minutes to achieve thermal equilibrium between the probe and
2. pH Measurement
Calibrate the pH meter by rinsing its electrode with distilled water. After calibration,
rinsed the electrode and submerged it in the water sample. Allow the readings to stabilize.
3. Temperature Measurement
At the sampling site, submerged the thermometer in the water for one minute. Removed
the thermometer from the water then read the temperature and record the temperature as
degrees Celsius.
The number of boundaries, rate of flow, velocity, and the cross-section area were
determined. 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.
37
The data required for this model are as follows:
Location of the intersection point of the sewage and the main river
The model formulation for a particular pollutant was based in mass balance principle
The mathematical model, corresponding with initial and boundary conditions, consists
parameter.
C C C 2C 2C
u v Dx 2 D y S
t x y x y 2
Where:
38
3.4.1 Discretization of DO Model
C C C 2C 2C
u v Dx D k a (C s C ) k d L
t x y x 2 y 2
y
Where:
L = BOD concentration
The formulated model was discretized (See solution in Appendix), and the equation becomes:
processes:
T T T T T T T H
u v D xx D xy D yx D yy 0
t x y x x y y t y Pc p
39
Discretizing the model (See solution Appendix), it becomes
represented as:
C C C 2C 2C
u v Dx 2 D y kp
t x y x y 2
Where:
k p is the rate constant due to chemical reaction (See appendix for the calculation of k p )
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,
40
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
Cornwell, 1991]
finite difference scheme. The finite difference approximation expressed the values and the
41
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 was defined and
situated around the grid point i. The river bed, the water surface and the two cross-sections
situated at i-1 and i+1, respectively, are the boundaries of this control volume as shown in the
figure below.
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
42
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
2013a. The simulation starts by loading the initial conditions such as pH, DO and temperature
of the water (Figure 7). Parameter values (e.g. dimensions of river, re-aeration rate, decay rate,
etc.) were initialized. Matrixes for the pH, DO and temperature were initially allocated in order
The loop is initialized by comparing the simulation time (tinst) with the target end time
(tend). The loop will terminate if the value of tinst is equal to that of tend. While tinst is not equal
The simulation time is then increased by time increment, dt (1 second). The new Temp
(temperature at tinst + dt) is calculated followed by, pH (pH at tinst + dt), and DO (DO at tinst +
dt). Initial temp, pH, and DO are then updated by the calculated values.
Another conditional statement is set in order to record the simulated data. If the
remainder is equal to the zero, then, the computed temp, pH and DO will be stored in an MS
Excel file. These data (denoted as simulation data) will be compared with the actual data.
43
Start
Load Initial
Temp, pH, DO
Conditions
Initialized Values
No
Update Boundary
Conditions
Increase time
Counter (tinst+dt)
Compute Temp
Compute pH
Compute DO Cs
Update Initial
Conditions
No Is trem= 0?
Yes
44
3.7 Model 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
paired 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
45
CHAPTER 4
The actual river water quality parameters (dissolved oxygen, temperature, and pH) were
taken every after 14 days. Water quality model for each parameter was developed using the
gathered data at the boundaries as the initial condition and was simulated using MATLAB™
software. The simulated data of dissolved oxygen, temperature, and pH were visually compared
with respective observed data values, as it can be seen in Table 9,10, and 11, respectively.
46
Table 10: Actual Vs. Theoretical for Temperature Model.
TEMPERATURE (°C)
I1 I2 I3
Day
Actual Simulated Actual Simulated Actual Simulated
0 23.64282 23.64282 23.64282 23.64282 23.64282 23.64282
1 23.5 23.64273 23.5 23.74208 23.5 23.86892
2 23.5 23.64273 22.5 22.74456 23 22.98371
3 24.5 23.64273 24.5 23.99145 25 24.38683
4 22.5 23.64273 22.75 22.74456 23 23.61102
5 26.25 23.64273 25.95 25.98648 26.05 25.85297
6 26 23.64273 27 26.98399 27 26.55424
7 27 23.64273 26.75 26.48524 27 25.42187
8 29 23.64273 29 29.97653 29.5 28.24762
9 30.5 23.64273 30.5 30.72466 30.5 29.46642
10 30.25 23.64273 30.6 31.32317 31.3 29.01829
pH
I1 I2 I3
Day
Actual Simulated Actual Simulated Actual Simulated
0 6.729063 6.729063 6.729063 6.729063 6.729063 6.729063
1 6.8 6.730181 6.8 6.944703 6.8 6.809095
2 6.9 6.730181 7.1 7.09433 7.2 7.125515
3 6.9 6.730181 5.8 6.994578 6.05 6.921187
4 5.3 6.730181 5.5 5.498309 5.7 6.723133
5 6.9 6.730181 6.85 7.044454 6.9 6.865814
6 4.365 6.730181 6.715 6.954678 7.04 6.983872
7 7.15 6.730181 6.95 7.09433 6.95 7.027873
8 6.9 6.730181 6.25 6.346195 6.4 6.853025
9 7.05 6.730181 7 7.09433 7.05 6.997216
10 6.9 6.730181 7.65 7.992091 7.933 7.472011
47
4.2 Statistical Analysis of Data
The statistical tool paired t-test in Microsoft Excel® 2016 was used to determine the
level of marginal significance between the actual and theoretical values. The table shows that
there is no significant difference between the actual and theoretical values since all the
calculated P values were greater than 0.05 for each water quality parameters (see Appendix
D.2) .Therefore, the application of these models is for calculating water quality parameters
P- VALUE
Day DO Temperature pH
1 0.149431 0.073541 0.9349353
2 0.131737 0.122403 0.111038
3 0.262688 0.074824 0.1132239
4 0.224742 0.110528 0.097535
5 0.3456 0.19445 0.4894128
6 0.167473 0.160795 0.190593
7 0.081787 0.096368 0.373332
8 0.278013 0.208978 0.277968
9 0.1264117 0.181043 0.262049
10 0.194457 0.164564 0.36077
The values of the actual and theoretical water quality parameters were plotted and their
coefficient of determination was determined. According to the literature, the formulated models
show good results for the simulation according to coefficient of determination. For the water
quality parameters, temperature, dissolved oxygen and pH, the highest R-squared value was
0.9858, 0.9468 and 0.7207, respectively. The simulated results were in good arguments with
measured values.
48
R2 =0.9858
(a) I1 (b) I2
R2 =0.9659
R2 =0.9659
(c) I3
Figure 7: Theoretical Vs. Actual Temperature for (a) I1 (b) I2 (c) I3.
49
R2 =0.7207
(a) I1 (b) I2
R2 =0.7116
(c) I3
50
R2 =0.7351
(a) I1 (b) I2
R2 =0.9468
(c) I3
51
4.4 Contour mapping
4.4.1 Temperature
The initial and final values simulated during the water quality sampling for temperature
was mapped as shown in Figure 10. As seen in the figures below, the initial and final
temperature conditions have the same area of the river wherein both maps displays lower
temperature on the left side of the map and higher temperature on the left side. This difference
in temperature is due to the depth of the river for which the deeper the river the lower the
temperature. Moreover, the color of the map shows higher temperature during the final
52
4.4.2 Dissolved Oxygen
Water quality contour maps were generated using the simulated initial and final values
of the dissolved oxygen model, as shown in Figure 11. The map shows the changes in the
concentration of the dissolved oxygen at a given distance in the boundary. From the contour
map of dissolved oxygen and temperature the relationship of both parameters are directly
proportional (Addy & Green, 1997). Dissolved oxygen is highest at the source, since colder
water holds more dissolved oxygen than warm water. However, due to the high input of
domestic and agricultural wastes in source 2 the amount of dissolved oxygen is reduced. Very
little difference of the initial and final values of the concentration of dissolved oxygen were
observed.
53
4.4.3 pH
The figures below are the contour maps for the river’s pH with the right one as the
initial condition and the other as the final. They are regular topographic maps but instead of
level.
The two figures show very little difference of pH level trend. They both displayed the
darkest color at areas around the source and the lightest color at the middle of the sinks. These
indicates that the sources, especially at the first one (B4), greatly affects the water’s pH. This
could be due to the content of the sources’ discharge that falls under domestic water waste.
Domestic water wastes usually contains acidic chemical compositions, dissolved components
and complex of detergents that contribute to the decrease of pH (Easa & Abou-Rayan, 2010).
54
4.5 Prediction of Water Quality Parameters
From the different water quality model formulated, results were in good arguments with
measured values. Hence, the models can be used to predict the amount of dissolved oxygen,
temperature and pH of the river. A span of one year was considered to predict the concentration
of the different parameters and the predicted values were shown in Table 13, 14, & 15. The
formulated model is at stable state after 1 year since simulated values for the whole year are
constant. The predicted value for DO, temperature and pH was 6.74335, 23.64282, and
7.663018, respectively.
55
Table 14: Prediction of Dissolved Oxygen.
pH
Time(sec) I1 I2 I3
0 6.74335 6.74335 6.74335
1209600 6.74335 6.74335 6.74335
2419200 6.74335 6.74335 6.74335
3628800 6.74335 6.74335 6.74335
4838400 6.74335 6.74335 6.74335
6048000 6.74335 6.74335 6.74335
7257600 6.74335 6.74335 6.74335
8467200 6.74335 6.74335 6.74335
9676800 6.74335 6.74335 6.74335
10886400 6.74335 6.74335 6.74335
12096000 6.74335 6.74335 6.74335
13305600 6.74335 6.74335 6.74335
14515200 6.74335 6.74335 6.74335
15724800 6.74335 6.74335 6.74335
16934400 6.74335 6.74335 6.74335
18144000 6.74335 6.74335 6.74335
19353600 6.74335 6.74335 6.74335
20563200 6.74335 6.74335 6.74335
21772800 6.74335 6.74335 6.74335
Table 15: Prediction for pH
DO (mg/L)
Time(sec) I1 I2 I3
0 7.662857 7.662857 7.662857
1209600 7.662857 7.662857 7.662857
2419200 7.662857 7.662857 7.662857
3628800 7.662857 7.662857 7.662857
4838400 7.662857 7.662857 7.662857
6048000 7.662857 7.662857 7.662857
7257600 7.662857 7.662857 7.662857
8467200 7.662857 7.662857 7.662857
9676800 7.662857 7.662857 7.662857
10886400 7.662857 7.662857 7.662857
12096000 7.662857 7.662857 7.662857
13305600 7.662857 7.662857 7.662857
14515200 7.662857 7.662857 7.662857
15724800 7.662857 7.662857 7.662857
16934400 7.662857 7.662857 7.662857
18144000 7.662857 7.662857 7.662857
19353600 7.662857 7.662857 7.662857
20563200 7.662857 7.662857 7.662857
21772800 7.662857 7.662857 7.662857
56
CHAPTER 5
Pinacanauan de Tuguegarao River were measured. For each parameter, a 2-D mathematical
model was formulated and then discretized using the method finite implicit difference. The
Simulated temperature, dissolved oxygen and pH values were visually and statistically
compared with the measured values. The formulated model proved to be a good tool to predict
Results show that there is no significant difference between the actual and theoretical
values since all the calculated P values were greater than 0.05 for each water quality
parameters. The acceptable R-squared value for temperature, dissolved oxygen and pH, was
Also, the model was used to predict the amount of dissolved oxygen, temperature, and
pH. The predicted value for DO, temperature and pH was 6.74335, 23.64282, and 7.663018,
respectively.
57
5.2 Recommendations
Developing river quality models needs to consider the following considerations starting
from data collection up to model simulation for better data and results; Testing of water
parameters for the collection of data needs to be at least a year, to account for the two seasons
(dry and wet) of the country, including the natural calamities such as typhoons and El Niño.
These conditions may affect the concentration and of river water. Also a closer time interval
during water sampling for more accurate and reliable data. Selection of wider boundary for
sampling points to avoid biases in the data collection. Make use of 3-D model for more actual
representation of the river and enables better decisions in water quality assessment.
Consideration of more river parameters in model formulation to account the effect of each
parameter to the river quality. Using higher quality of computer with a bigger storage and faster
58
REFERENCES
http://echo2.epfl.ch/VICAIRE/mod_2/chapt_9/main.htm
Abdullah, N. (2007). A Study of Several Implicit Finite Difference Schemes for the Linear
Convection Equation.
Addy, K., & Green, L. (1997). Dissolved Oxygen and Temperature. Natural Resources Facts.
Ali, W., & Husnain , H. (2010). Development of Dissolved Oxygen Model for a Highly
Variable Flow River: A Case Study of Ravi River in Pakistan. Research Gate.
Chemical Engineering.
Approach.
Baca, R., & Arnett, R. C. (1976). A limnological model for eutrophic lakes and
Benedini, M. (2011). Water Quality Models for Rivers and Streams. State of the Art and
59
Benedini, M., & Tsakiris, G. (2013). Water Quality Modelling for Rivers and Streams. New
York: Springer.
Bowen, I. (1926). The ratio of heat losses by conduction and by evaporation from any water
Bowen, J. D., Perry, D. N., & Bell, C. D. (2014, November). Hydrologic and Water Quality
616-629. doi:10.3390
Bowie, G. L., Mills, W. B., Porcella, D. B., Campbell, C. L., Pagenkopf, J. R., Rupp, G. L., . .
Quality Modeling.
Churuksaeva, V., & Starchenko, A. (2015). Mathematical Modeling of a River Stream Based
D.M.Causon, & Mingham, C. G. (2010). Introductory Finite Difference Methods for PDES.
Dawood, A. S., Hussain, H. K., & Hassan, M. (2016, October). Modeling of River Water
Dayag, C. R., Gazmen, M. N., & Quizon, R. A. (2016). Water Quality Monitoring
Easa, A., & Abou-Rayan, A. (2010). Domestic Wastewater Effect on the Pollution of the
60
Conference, IWTC, pp. 909-923. Retrieved from
https://pdfs.semanticscholar.org/4b27/3b40fb9e49934bc0f67073adeff954752c1d.pdf
https://nptel.ac.in/courses/105101010/downloads/Lecture29.pdf
Espejo, J., Tungpalan, J., Negi, V., & Alex, S. (2015). Physicochemical and Bacteriological
101/numerical-issues/implicit-versus-explicit-numerical-methods/
Fonseca, A. R. (2014). River Water Quality Modelling for River Basin and Water Resources
Management.
Gonçalves, J. C., Silveira, A., Lopes Júnior, G. B., da Luz , M. S., & Simões, A. A. (2017).
Haider, H., & Ali, W. (2010). Development of Dissolved Oxygen Model for a Highly
Variable Flow River: A Case Study of Ravi River in Pakistan. Research Gate.
Herb, W., & Heinz , S. (2008). A flow and temperature model for the Vermillion River, Part
61
Hussain, S. A., Atshan, W. G., & Najam, Z. M. (2012, October). Mathematical Model for the
Introduction to Finite Difference Method and Fundamentals of CFD. (n.d.). Retrieved from
NPTEL: https://nptel.ac.in/courses/112104030/pdf/lecture1.pdf
Jarvie, H. P., Whitton, B., & Neal, C. (1998). Nitrogen and phosphorus s in east coast British
Environment, 79–109.
Kang, G. K., Gao, J., & Xie, G. (2017). Data-driven Water Quality Analysis and Prediction:
Kaw, A., Nguyen, C., & Snyder, L. (2012, July 17). mathforcollege. Retrieved from
http://nm.mathforcollege.com/:
http://mathforcollege.com/nm/mws/gen/08ode/mws_gen_ode_spe_finitedif.pdf
Knight, A. (2000). Beyond, Basics of MATLAB® and. Washington DC: CRC press LLC.
Ledder, G. (2015). Mathematics for the Life Sciences: Calculus, Modeling, Probability, and
Lindenschmidt, D.-I. K.-E. (2005). River water quality modelling for river basin and water
62
Livshits, D. I., & Coleman, N. (2008). Mathematical Modeling.
Loucks, D. P., & Beek, E. (2005). Water Resources Systems Planning and Management, An
Loucks, D. P., & Beek, E. (2005). Water Resources Systems Planning and Management, An
Loucks, D. P., & Beek, E. V. (2005). Water Resources Systems Planning and Management.
Makita, S., & Saeki, H. (2006). Method of Water Quality Improvement by Use of Ice Floe
Mirbaghery, S. A., Abaspour, M., & Zamani, K. (2009). Mathematical Modelling of Water
Mulla, R. K., & Bhosale, S. M. (2016, August). Water Quality Analysis and Simulation of
https://www.comsol.com/multiphysics/what-is-mass-transfer
https://www.comsol.com/multiphysics/navier-stokes-equations
astr.gsu.edu/hbase/thermo/heatra.html
astr.gsu.edu/hbase/index.html
63
Nikishkov, G. P. (2004). INTRODUCTION TO THE FINITE.
Orlob, G. T., , Bruce Beck, M., Harleman, D. F., Jacquet, J., Jorgesnen, S. E., . . . Watanabe,
Raterman, B., Schaars, F. W., & Griffioen, M. (2000). GIS and MATLAB Integrated
Groundwater Modelling.
Ryan, P., & Harleman, D. R. (1973). An analytical and experimental study of transient
EWRA, 31-41.
64
Serway, R. A., Faughn, J. S., Vuille, C., & Bennett, C. A. (2006). College Physics (7th ed.).
Skorzinski, E., Shacham, M., & Brauner, N. (2009). A Simulation Program for Modelling
Subklay, K., & Pochai, N. (2017). Numerical Simulations of a Water Quality Model in a
Flooding Stream Due to Dam-break Problem Using Implicit and Explicit Methods.
Swinbank, W. (1963). Long wave radiation from clear skies. Quarterly Journal of the Royal
Tetra Tech, I. (1983). The Integrated Lake-Watershed Acidification Study, Volume 1: Model
http://www2.physics.uiowa.edu/~rmerlino/1701_F_16/1701_conservation_laws.pdf
Ukpaka, C., & Douglas, I. E. (2016). Model Development for pH, Salinity and Conductivity
Sciences Journal.
Verwer, J. (1998, July). Numerical Algorithms for Air and Surface Water Quality Modelling.
ERCM.
65
Wageningen-Kessels van, F., Lint, H. v., Hoogendoorn, S. P., & Vuik, K. (2008). Implicit
66
APPENDIX A
First Sampling
pH Temperature(˚C) Dissolve Oxygen
(mg/L)
B1 6.85 23.75 7.86
B2 6.75 23.5 7.645
B3 6.8 23.5 7.505
B4 6.7 23.5 7.58
B5 6.8 23.5 7.62
B6 6.55 23.75 7.675
B7 6.75 24.0 7.755
I1 6.8 23.5 7.665
12 6.8 23.5 7.685
13 6.8 23.5 7.685
Second Sampling
pH Temperature Dissolve Oxygen
(mg/L)
B1 7.0 22.75 5.54
B2 6.8 22.75 4.785
B3 7.25 23.0 5.365
B4 6.75 23.25 0.83
B5 6.9 23.75 5.245
B6 7.1 22.75 5.8
B7 7.2 22.75 6.24
I1 6.9 23.5 6.41
12 7.5 22.5 5.955
13 7.2 23.0 6.1
Third Sampling
pH Temperature Dissolve Oxygen
(mg/L)
B1 6.9 24 8.4
B2 5.6 23.5 7.87
B3 5.65 24.0 8.22
B4 5.6 24.0 8.25
B5 6.9 24.3 8.45
B6 6.85 24.5 8.72
B7 6.9 24.75 8.48
I1 6.9 24.5 9.03
12 5.8 24.5 8.27
13 6.05 25.0 8.16
67
Fourth Sampling
pH Temperature(˚C) Dissolve Oxygen
(mg/L)
B1 5.4 22.75 7.61
B2 5.25 23.0 8.0
B3 6.7 23.0 8.045
B4 5.55 23.0 8.465
B5 5.2 22.75 8.195
B6 5.0 23.0 7.955
B7 5.4 23.75 7.995
I1 5.3 22.5 8.24
12 5.5 22.75 8.19
13 5.7 23.0 7.56
Fifth Sampling
pH Temperature(˚C) Dissolve Oxygen
(mg/L)
B1 6.95 26.0 7.445
B2 6.85 25.95 7.05
B3 6.85 26.1 7.365
B4 7.15 26.25 7.525
B5 6.85 26.35 8.2
B6 6.9 26.0 7.765
B7 6.8 26.8 7.64
I1 6.9 26.25 8.23
12 6.85 25.95 7.525
13 6.9 26.05 7.335
Sixth Sampling
pH Temperature(˚C) Dissolve Oxygen
(mg/L)
B1 6.86 27.0 6.35
B2 3.315 27.0 6.6
B3 5.64 26.75 6.25
B4 2.79 27.5 7.15
B5 3.755 26.0 6.9
B6 6.245 27.0 6.4
B7 7.07 27.75 6.3
I1 4.365 26.0 6.95
12 6.715 26.5 7.05
13 7.04 26.5 6.3
68
Seventh Sampling
pH Temperature(˚C) Dissolve Oxygen
(mg/L)
B1 7.0 26.5 6.49
B2 6.9 27.0 4.165
B3 6.9 27.0 5.73
B4 7.2 27.0 4.68
B5 6.95 26.75 5.855
B6 7.0 26.5 6.52
B7 7.05 26.0 6.59
I1 7.15 27.0 5.36
12 6.95 26.75 5.22
13 6.95 27.0 6.615
Eight Sampling
pH Temperature(˚C) Dissolve Oxygen
(mg/L)
B1 6.25 30.0 4.735
B2 6.15 29.0 3.74
B3 6.3 29.25 4.545
B4 7.0 28.75 2.585
B5 6.9 28.5 2.765
B6 6.9 29.25 2.745
B7 6.85 30.0 3.24
I1 6.9 29.0 2.485
12 6.25 29.0 5.63
13 6.4 29.5 4.75
Ninth Sampling
pH Temperature(˚C) Dissolve Oxygen
(mg/L)
B1 7.0 30.75 7.685
B2 6.95 30.75 7.175
B3 6.95 30.5 7.525
B4 7.05 31.0 7.315
B5 7.0 30.25 7.43
B6 7.0 31.0 7.56
B7 7.0 31.75 7.635
I1 7.05 30.5 7.39
12 7.0 30.5 7.345
13 7.05 30.5 7.555
69
Tenth Sampling
pH Temperature(˚C) Dissolve Oxygen
(mg/L)
B1 7.9 31.35 6.77
B2 7.9 30.65 6.02
B3 7.9 30.7 6.21
B4 7.05 30.35 6.19
B5 6.95 30.2 6.225
B6 7.9 30.55 6.685
B7 7.6 31 6.565
I1 6.9 30.25 30.25
12 7.75 30.6 30.6
13 7.633 31.3 7.003
Velocity (m/s)
v_1 0.205432
v_2 0.533079
v_3 0.569175
v_4 0.15232
v_5 0.070872
Average 0.306176
Elevation Difference
Slope river
Length of River
70
Length of river 200 m.
Minimum Elevation 18 m.
Maximum Elevation 27 m.
Elevation Difference 9 m.
Slope of river 0.045
A. 5 Meteorological Data
71
APPENDIX B
C C C 2C 2C
u v Dx 2 D y 2 k a (C s C ) k d L
t x y x y
Ci , j ,t 1 Ci , j ,t u Ci , j ,t Ci j , j ,t u Ci , j ,t Ci , j 1,t Dx Ci 1, j ,t 2Ci , j ,t Ci 1, j ,t D y Ci , j 1,t 2Ci , j ,t Ci , j 1,t
t x y x 2 y 2
k a C sat Ci , j ,t k d L
k a C sat Ci , j ,t k d L
x y
The advection-dispersion model with sink or source terms to prevent physical processes:
T T T T T H
u v D x D y 0
t x y x x y y Pc p
T T T T T H
Dx D y u v 0
t x x y y x y Pc p
Assume u = v
72
T 2T 2T T T H
Dx 2 D y 2 u u 0
t x y x y Pc p
B.1.3 pH Model
The pH model was based on the two-dimensional advection-dispersion model and represented
as:
C C C 2C 2C
u v Dx D kp
t x y x 2 y 2
y
73
Dx Ci 1, j ,t 2Ci , j ,t Ci 1, j ,t D y Ci , j 1,t 2Ci , j ,t Ci , j 1,t
x 2
y 2
t C
u Ci , j ,t Ci j , j ,t u Ci , j ,t Ci , j 1,t
Ci , j ,t 1
i , j ,t
kp
x y
S k a (C s C ) k d L
5V 50.30618
k a (20C ) 0.72599
h 5/3
1.564615 / 3
For the calibration of reaeration rate ka:
k a 0.72599 x1.02426.434520
1
k a 0.84568
day
H
S
Pc p
H H S H SR H A H AR H BR H E H C
H SN H S H SR 0.94 H SC 1 0.65SK 2
0.94 779.091 1 0.650.414
2
650.7868275 W/m 2
H AN H A - H AR 5.16432 10 13
1 0.17 SK TA 273.166
74
H AN H A - H AR 5.16432 10 1 0.17 SK TA 273.166
13
5.16432 10 -13
1 0.17 0.414 27.26 273.166
392.1994804 W / m 2
H BR TS
4
H BR 0.97 5.670 10 -8 26.4507 273.15
4
H BR 0.4431248322 W / m 2
H E W L a bW es - ea
H E W L a bW es - ea
L = (597 - 0.57 × TS )
= 2343.766255 W / m 2
eS = a j + b jTs
4157
e a = 2.171 × 108 e
Td + 239.09
= 24.51048738
H E 997.05 2343.766255 0 1 10 -9 2 34.6054558 - 24.51048738
0.04901276095 W / m 2
T -T
H C H E 6.19 10 8 p S A
e S - ea
75
H C H E 6.19 10 -4 p TS - TA
e S - ea
0.04901276095 6.19 10 -4 1008.7 26.4507 - 20.775
34.6054558 - 24.51048738
1.47205857 10 -5 W / m 2
Calculation for
H QS QSR Q A Q AR QBR QE QC
-650.7868275 392.1994804 - 0.4431248322 - 0.04901276095 1.47205857 10 -5
-259.049483 W/m 2
H - 259.049483 W/m 2
hcp
1.56461 m 997.05 kg3 4182 J
m kg
0.00005575964433
B.2.3 pH Model
2385.73
299.600714.0184 0.0152642 299.6007
k H 44,000mg / mol 10
mg
k H 1449.605441
L.atm
mg
CO2,sat 1449.605441 0.00033atm
L.atm
3404.71
14.84350.032786 299.6007 299.6007
k1 10
mg
k1 4.53557571x10 7
L
76
2902.39
6.4980.02379299.6007 299.6007
k2 10
mg
k 2 4.819166316 x10 11
L
Dx cL4 / 3
Dx 0.01200
4/3
2
cm 2 1m
Dx 11.69607095
sec 100cm
m2
Dx 1.169607095 x10 3
sec
B.3.2 Coefficient of vertical diffusion
D y 0.067 u* H
D y 0.067 H gRh S
m
Dy (0.067)(1.56461m) (9.81 )(1.56461m)(0.045m)
s2
m2
Dy 0.08712
sec
77
APPENDIX C
MATLAB™ CODES
clear all
close all
clc
%Initialized matrix
Temp(1:121,1:200,1:2) = 23.642857;
pH(1:121,1:200,1:2) = 6.72857;
DO(1:121,1:200,1:2) = 7.662857;
dx = 1;
dy = 1;
dt = 1;
t_end = 10*14*3600*24;
t_inst =0;
u = 1:200;
v = 1:121;
x = 1:200;
y = 1:121;
i = 2;
t = 1;
m = (2:199);
n = (2:120);
p = (120:199);
a = 0.306176; %velocitY
ka = 0.84568./(24*3600);
kd = 0.671940043./(24*3600);
kp = 0.00000045355757; %rate constant due to reaction
L = 1; %BOD
d = 0.000000146219647;
Dx = 0.001169607095; %longitudinal diffusion constant
Dy = 0.08712; %vertical diffusion constant
A = -0.01289651149;
Ey = 1.171645495;
ky = 4169663.1;
Cp = 4182;
r = 997.05; %density
K = 0.6096866667; %thermal conductivity
if t_inst == 0*3600*24
Temp(1,u,t) = 23.5;
Temp(1,v,t) = 23.5;
78
Temp(121,x,t) = 0.0025.*x + 23.625;
Temp(200,y,t) = 23.75;
Temp(1,u,t) = 23;
Temp(1,v,t) = 22.75;
Temp(121,x,t) = 0.0075.*x + 22.625;
Temp(200,y,t) = 22.75;
79
DO(1,u,t) = 0.00002.*x.^2 - 0.0065.*x + 8.4715;
DO(1,v,t) = 8.195;
DO(121,x,t) = 0.0004.*x + 7.935;
DO(200,y,t) = 7.61;
Temp(1,u,t) = 27;
Temp(1,v,t) = 26.75;
Temp(121,x,t) = -0.005.*x + 26.75;
Temp(200,y,t) = 26.5;
80
Temp(1,u,t) = -0.00007.*x.^2 + 0.0119.*x + 28.738;
Temp(1,v,t) = 28.5;
Temp(121,x,t) = 0.0075.*x + 28.875;
Temp(200,y,t) = 30;
end
%discretized codes
%Temperature Model
%Interior Nodes
Temp(n,m,t+1) = ( dt.*((Dx.*(Temp(n-1,m,t)-
(2.*Temp(n,m,t))+Temp(n+1,m,t))./(dx.^2))+ (Dy.*(Temp(n,m-1,t)-
81
(2.*Temp(n,m,t))+ Temp(n,m+1,t))./(dy.^2))-((a.*(Temp(n,m,t)-Temp(n-
1,m,t)))./(dx))-((a.*(Temp(n,m,t)-Temp(n,m-1,t)))./(dy)))-
0.00003974749081)+ (Temp(n,m,t));
%pH Model
%Interior Nodes
pH(n,m,t+1) = ( dt.*((Dx.*(pH(n-1,m,t)-
(2.*pH(n,m,t))+pH(n+1,m,t))./(dx.^2))+ (Dy.*(pH(n,m-1,t)-(2.*pH(n,m,t))+
pH(n,m+1,t))./(dy.^2))-((a.*(pH(n,m,t)-pH(n-1,m,t)))./(dx))-
((a.*(pH(n,m,t)-pH(n,m-1,t)))./(dy)))+kp)+ (pH(n,m,t));
%DO Model
%Interior Nodes
DO(n,m,t+1)=( dt.*((Dx.*(DO(n-1,m,t)-
(2.*DO(n,m,t))+DO(n+1,m,t))./(dx.^2))+ (Dy.*(DO(n,m-1,t)-(2.*DO(n,m,t))+
DO(n,m+1,t))./(dy.^2))-((a.*(DO(n,m,t)-DO(n-1,m,t)))./(dx))-
((a.*(DO(n,m,t)-DO(n,m-1,t)))./(dy))+(ka.*(Csat(Temp(n,m,t))-DO(n,m,t)))-
(kd.*L)))+ (DO(n,m,t));
if rem(t_inst,1209600) == 0
xlswrite_1('C:\Users\maricel\Documents\Thesis\Simulation Result
2019.xlsx',t_inst,'Simulation Result',strcat('A',int2str(i)))
xlswrite_1('C:\Users\maricel\Documents\Thesis\Simulation Result
2019.xlsx',Temp(60,2,t+1),'Simulation Result',strcat('B',int2str(i)))
xlswrite_1('C:\Users\maricel\Documents\Thesis\Simulation Result
2019.xlsx',Temp(60,100,t+1),'Simulation Result',strcat('C',int2str(i)))
xlswrite_1('C:\Users\maricel\Documents\Thesis\Simulation Result
2019.xlsx',Temp(60,199,t+1),'Simulation Result',strcat('D',int2str(i)))
xlswrite_1('C:\Users\maricel\Documents\Thesis\Simulation Result
2019.xlsx',pH(60,2,t+1),'Simulation Result',strcat('F',int2str(i)))
xlswrite_1('C:\Users\maricel\Documents\Thesis\Simulation Result
2019.xlsx',pH(60,100,t+1),'Simulation Result',strcat('G',int2str(i)))
xlswrite_1('C:\Users\maricel\Documents\Thesis\Simulation Result
2019.xlsx',pH(60,199,t+1),'Simulation Result',strcat('H',int2str(i)))
xlswrite_1('C:\Users\maricel\Documents\Thesis\Simulation Result
2019.xlsx',DO(60,2,t+1),'Simulation Result',strcat('J',int2str(i)))
xlswrite_1('C:\Users\maricel\Documents\Thesis\Simulation Result
2019.xlsx',DO(60,100,t+1),'Simulation Result',strcat('K',int2str(i)))
xlswrite_1('C:\Users\maricel\Documents\Thesis\Simulation Result
2019.xlsx',DO(60,199,t+1),'Simulation Result',strcat('L',int2str(i)))
i = i+1;
end
Temp(n,m,1) = Temp(n,m,2);
pH(n,m,1) = pH(n,m,2);
DO(n,m,1) = DO(n,m,2);
Boundary = DO(60,200,1);
Inside = DO(60,60,1);
t_inst = t_inst + dt
end
82
C.2 Matlab™ Codes for Forecasting
clear all
close all
clc
%Initialized matrix
Temp_import = importfile1_matrix('C:\Users\Laica
Manaligod\Documents\matlab\Simulation Result 2019.xlsx','Temp','A1:GR121');
pH_import = importfile1_matrix('C:\Users\Laica
Manaligod\Documents\matlab\Simulation Result 2019.xlsx','pH','A1:GR121');
DO_import= importfile1_matrix('C:\Users\Laica
Manaligod\Documents\matlab\Simulation Result 2019.xlsx','DO','A1:GR121');
Temp(1:121,1:200,1)= Temp_import(:,:,1);
pH(1:121,1:200,1)= pH_import(:,:,1);
DO(1:121,1:200,1)= DO_import(:,:,1);
Temp(1:121,1:200,2)= Temp(1:121,1:200,1);
pH(1:121,1:200,2)= pH(1:121,1:200,1);
DO(1:121,1:200,2)= DO(1:121,1:200,1);
dx = 1;
dy = 1;
dt = 1;
t_end = 3*12*30*24*3600;
t_inst =0;
u = 1:200;
v = 1:121;
x = 1:200;
y = 1:121;
i = 2;
t = 1;
m = (2:199);
n = (2:120);
p = (120:199);
a = 0.306176; %velocity
ka = 0.84568./(24*3600);
kd = 0.671940043./(24*3600);
kp = 0.00000045355757; %rate constant due to reaction
L = 1; %BOD
d = 0.000000146219647;
Dx = 0.001169607095; %longitudinal diffusion constant
Dy = 0.08712; %vertical diffusion constant
A = -0.01289651149;
Ey = 1.171645495;
kx = 0.6096866667; %thermal conductivity
ky = 4169663.1;
Cp = 4182;
r = 997.05; %density
83
K = 0.6096866667; %thermal conductivity
%Minimum
Temp(1,u,t,1) = -0.00002.*x.^2 -0.008.*x + 23.251;
Temp(1,v,t,1) = 23.75;
Temp(121,x,t,1) = 22.75;
Temp(200,y,t,1) = 22.75;
pH (1,u,t,2) = pH (1,u,t,1);
pH (1,v,t,2) = pH (1,v,t,1);
pH (121,x,t,2) = pH (121,x,t,1);
pH (200,y,t,2) = pH (200,y,t,1);
DO (1,u,t,2) = DO (1,u,t,1);
DO (1,v,t,2) = DO (1,v,t,1);
DO (121,x,t,2) = DO (121,x,t,1);
DO (200,y,t,2) = DO (200,y,t,1);
%Temperature Model
%Interior Nodes
Temp(n,m,t+1) = ( dt.*((Dx.*(Temp(n-1,m,t)-
(2.*Temp(n,m,t))+Temp(n+1,m,t))./(dx.^2))+ (Dy.*(Temp(n,m-1,t)-
(2.*Temp(n,m,t))+ Temp(n,m+1,t))./(dy.^2))-((a.*(Temp(n,m,t)-Temp(n-
1,m,t)))./(dx))-((a.*(Temp(n,m,t)-Temp(n,m-1,t)))./(dy)))-
0.00003974749081)+ (Temp(n,m,t));
%pH Model
%Interior Nodes
pH(n,m,t+1) = ( dt.*((Dx.*(pH(n-1,m,t)-
(2.*pH(n,m,t))+pH(n+1,m,t))./(dx.^2))+ (Dy.*(pH(n,m-1,t)-(2.*pH(n,m,t))+
pH(n,m+1,t))./(dy.^2))-((a.*(pH(n,m,t)-pH(n-1,m,t)))./(dx))-
((a.*(pH(n,m,t)-pH(n,m-1,t)))./(dy)))+kp)+ (pH(n,m,t));
%DO Model
%Interior Nodes
DO(n,m,t+1)=( dt.*((Dx.*(DO(n-1,m,t)-
(2.*DO(n,m,t))+DO(n+1,m,t))./(dx.^2))+ (Dy.*(DO(n,m-1,t)-(2.*DO(n,m,t))+
DO(n,m+1,t))./(dy.^2))-((a.*(DO(n,m,t)-DO(n-1,m,t)))./(dx))-
((a.*(DO(n,m,t)-DO(n,m-1,t)))./(dy))+(ka.*(Csat(Temp(n,m,t))-DO(n,m,t)))-
(kd.*L)))+ (DO(n,m,t));
84
if rem(t_inst,2592000) == 0
i = i+1;
end
t_inst = t_inst + dt
end
85
APPENDIX D
Time pH 1 pH 2 pH 3
0 6.729063104 6.729063 6.729063
1209600 6.730180523 6.894827 6.87485
2419200 6.730180523 6.994578 6.983705
3628800 6.730180523 6.994578 6.059489
4838400 6.730180522 5.298807 5.547414
6048000 6.730180523 6.944703 6.878135
7257600 6.730180522 3.857401 4.742024
8467200 6.730180523 7.044454 6.917834
9676800 6.730180523 6.994578 6.473242
10886400 6.730180523 7.09433 6.965123
12096000 6.730180523 7.044454 7.573703
Time DO 1 DO 2 DO 3
0 7.662857045 7.662857 7.662857
1209600 7.662857146 7.580413 7.570965
2419200 7.662857145 5.255534 5.516869
3628800 7.662857147 8.446384 7.960136
4838400 7.662857147 8.192951 7.890884
6048000 7.662857147 8.196918 7.349858
7257600 7.662857146 6.902685 6.739515
8467200 7.662857146 5.862051 5.180374
9676800 7.662857144 2.785106 5.413771
10886400 7.662857146 7.429333 7.386458
12096000 7.662857146 6.229605 6.456207
86
Temperature
87
pH
88
Dissolved Oxygen
89
D.2 Statistical Analysis Using Paired t-Test in Excel
D.2.1. Temperature
90
t-Test: Paired Two Sample for Means (Day 4)
Actual Theoretical
Mean 22.75 23.33277
Variance 0.0625 0.259745
Observations 3 3
Pearson Correlation -0.03111
Hypothesized Mean 0
Difference
df 2
t Stat -1.75666
P(T<=t) one-tail 0.110528
t Critical one-tail 2.919986
P(T<=t) two-tail 0.221057
t Critical two-tail 4.302653
91
t-Test: Paired Two Sample for Means (Day 7)
Actual Theoretical
Mean 26.91667 25.18328
Variance 0.020833 2.0626597
Observations 3 3
Pearson Correlation -0.78508
Hypothesized Mean 0
Difference
df 2
t Stat 1.934369
P(T<=t) one-tail 0.096368
t Critical one-tail 2.919986
P(T<=t) two-tail 0.192735
t Critical two-tail 4.302653
92
t-Test: Paired Two Sample for Means (Day 10)
Actual Theoretical
Mean 30.71667 27.99473
Variance 0.285833 15.533046
Observations 3 3
Pearson Correlation 0.531464
Hypothesized Mean 0
Difference
df 2
t Stat 1.279386
P(T<=t) one-tail 0.164564
t Critical one-tail 2.919986
P(T<=t) two-tail 0.329127
t Critical two-tail 4.302653
93
t-Test: Paired Two Sample for Means (Day 3)
Actual Theoretical
Mean 8.486667 8.109264
Variance 0.224433 0.15358368
Observations 3 3
Pearson Correlation -0.96079
Hypothesized Mean 0
Difference
df 2
t Stat 0.762586
P(T<=t) one-tail 0.262688
t Critical one-tail 2.919986
P(T<=t) two-tail 0.525376
t Critical two-tail 4.302653
94
t-Test: Paired Two Sample for Means (Day 6)
Actual Theoretical
Mean 6.583333 6.89763033
Variance 0.110833 0.46484005
Observations 3 3
Pearson Correlation 0.856545
Hypothesized Mean 0
Difference
df 2
t Stat -1.25942
P(T<=t) one-tail 0.167473
t Critical one-tail 2.919986
P(T<=t) two-tail 0.334947
t Critical two-tail 4.302653
95
t-Test: Paired Two Sample for Means (Day 9)
Actual Theoretical
Mean 7.5016667 7.6635333
Variance 0.0327583 0.0003704
Observations 3 3
Pearson Correlation 0.2916876
Hypothesized Mean 0
Difference
df 2
t Stat -1.589868
P(T<=t) one-tail 0.1264117
t Critical one-tail 2.9199856
P(T<=t) two-tail 0.2528234
t Critical two-tail 4.3026527
D.2.3 pH
96
t-Test: Paired Two Sample for Means (Day 2)
Actual Theoretical
Mean 7.066667 6.983342
Variance 0.023333 0.048311
Observations 3 3
Pearson Correlation 0.965751
Hypothesized Mean 0
Difference
df 2
t Stat 1.750834
P(T<=t) one-tail 0.111038
t Critical one-tail 2.919986
P(T<=t) two-tail 0.222076
t Critical two-tail 4.302653
97
t-Test: Paired Two Sample for Means (Day 5)
Actual Theoretical
Mean 6.8833333 6.8801497
Variance 0.0008333 0.024846
Observations 3 3
Pearson Correlation -0.902716
Hypothesized Mean 0
Difference
df 2
t Stat 0.0299518
P(T<=t) one-tail 0.4894128
t Critical one-tail 2.9199856
P(T<=t) two-tail 0.9788256
t Critical two-tail 4.3026527
98
t-Test: Paired Two Sample for Means (Day 8)
Actual Theoretical
Mean 6.516667 6.6431337
Variance 0.115833 0.0699021
Observations 3 3
Pearson Correlation 0.489338
Hypothesized Mean 0
Difference
df 2
t Stat -0.7009
P(T<=t) one-tail 0.277968
t Critical one-tail 2.919986
P(T<=t) two-tail 0.555936
t Critical two-tail 4.302653
99
APPENDIX E
LETTERS
100
101
102
APPENDIX F
DOCUMENTATION
Figure 13: First discharge for the chosen boundary. A continuous flowing water coming from the residential
houses.
Figure 14: Second discharge located upstream. A pipe projected directly to the river coming from residential
houses which produces a dark fluid with an awlful smell.
Figure 15: A photo of the group measuring the width of the river (left side) and the its length on the land area
(right side).
103
Figure 16: Labelled plastic bottles for the sample collection. From boundary 1 to boundary 7
and inner boundary 1 to inner boundary 3 with two replicates.
Figure 17: Sample collection from the chosen sampling points. The sampling bottles was
cupped under water to prevent air bubbles.
Figure 18: Analysing the samples using chemical test for the parameters pH and DO. Photo
taken at Bureau of Fisheries and Aquatic Resources (BFAR) laboratory.
104
Figure 19: On-site water analysis using the equipment devices (Thermometer, pH meter, and
DO meter).
105
Figure 22: Setting up for the Measuring of velocity using a table tennis ball and timer.
Figure 24: Photo taken during the last data collection with the boat owner Lyafayeth Tasi.
106
Figure 25: Photo taken at the Laboratory of BFAR with ma'am Divine.
107