You are on page 1of 117

MATHEMATICAL MODELLING OF WATER QUALITY IN PINACANAUAN DE

TUGUEGARAO RIVER

A Thesis Proposal presented to the

Chemical Engineering Faculty

Cagayan State University

Carig Sur, Tuguegarao City

In Partial Fulfillment of the Requirements

For the Degree of

Bachelor of Science in Chemical Engineering

Submitted by:

Alumit, Razel V. Jr.

Dulliyao, Van Vesper J.

Guillermo, Denver V.

Mamba, Rhea D.

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

were used to predict the water quality parameters after 1 year.

i
Table of Contents

Abstract ...................................................................................................................................... i

Chapter 1 .................................................................................................................................. 1

INTRODUCTION.................................................................................................................... 1

1.1 Background of the Study .................................................................................................. 1

1.2 Statement of the Problem ................................................................................................. 2

1.3 Objectives of the Study .................................................................................................... 2

1.4 Scope and Limitations ...................................................................................................... 3

1.5 Significance of the Study ................................................................................................. 3

1.6 Locale of the Study .......................................................................................................... 3

1.7 Definition of Terms .......................................................................................................... 4

Chapter 2 .................................................................................................................................. 5

REVIEW OF RELATED LITERATURE ............................................................................ 5

2.1 Pinacanauan de Tuguegarao River ................................................................................... 5

2.2 Water Quality Parameters ................................................................................................ 5

2.3. Governing Laws .............................................................................................................. 7

2.3.1 Conservation Law ...................................................................................................... 7

2.3.2 Hydrodynamics and Transport .................................................................................. 8

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

2.4.1 Finite Difference Method ........................................................................................ 12

2.4.2 Finite Element Method ............................................................................................ 14

2.5 Mathematical Model ...................................................................................................... 15

ii
2.5.1 Formulation of Water Quality Model ...................................................................... 16

2.6. Diffusion Coefficients ................................................................................................... 25

2.6 MATLAB® .................................................................................................................... 25

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

2.7 Theoretical Framework .................................................................................................. 29

2.8 Conceptual Framework .................................................................................................. 32

CHAPTER 3 ........................................................................................................................... 34

METHODOLOGY ................................................................................................................ 34

3.1 Study Area ...................................................................................................................... 34

3.2 Initial and Boundary Conditions .................................................................................... 35

3.3 Data Collection ............................................................................................................... 36

3.3.1 Water Quality Parameters ........................................................................................ 36

3.3.1.2 Chemical Method ................................................................................................. 36

3.3.1.3 Used of Measuring Devices .................................................................................. 37

3.3.2 River Geometry ....................................................................................................... 37

3.4 Model Formulation ......................................................................................................... 38

3.4.1 Discretization of DO Model .................................................................................... 39

3.4.2 Discretization of Temperature ................................................................................. 39

3.4.3 Discretization of pH Model ..................................................................................... 40

3.4 Estimation and Calibration of Reaeration and Decay Rate Coefficient ......................... 40

3.5 Solution Scheme............................................................................................................. 41

iii
3.6 Simulation Methodology ........................................................................................... 43

3.7 Model Validation............................................................................................................ 45

CHAPTER 4 ........................................................................................................................... 46

Results and Discussions ......................................................................................................... 46

4.1 Comparison of Actual and Simulated Data .................................................................... 46

4.2 Statistical Analysis of Data ............................................................................................ 48

4.3 Model Accuracy ............................................................................................................. 48

4.4 Contour mapping ............................................................................................................ 52

4.4.1 Temperature ............................................................................................................. 52

4.4.2 Dissolved Oxygen.................................................................................................... 53

4.4.3 pH ............................................................................................................................ 54

4.5 Prediction of Water Quality Parameters......................................................................... 55

CHAPTER 5 ........................................................................................................................... 57

5.1 Summary and Conclusion .............................................................................................. 57

5.2 Recommendations .......................................................................................................... 58

REFERENCES ....................................................................................................................... 59

APPENDIX A ......................................................................................................................... 67

Water Quality Parameters, River Geometry, and Meteorological Data .................................. 67

A.1 Actual Data .................................................................................................................... 67

A.2 Average Height of the River ......................................................................................... 70

A.3 Average Velocity........................................................................................................... 70

iv
A.4 Slope of the River .......................................................................................................... 70

A. 5 Meteorological Data ..................................................................................................... 71

APPENDIX B ......................................................................................................................... 72

Model Discretization and Calculation of Sources/Sinks ......................................................... 72

B.1 Discretization of Formulated Model.............................................................................. 72

B.1.1 Dissolved Oxygen Model ....................................................................................... 72

B.1.2 Temperature Model ................................................................................................. 72

B.1.3 pH Model ................................................................................................................ 73

B.2 Calculation of the Sources/Sinks ................................................................................... 74

B.2.1 Dissolved Oxygen ................................................................................................... 74

B.2.2 Temperature model ................................................................................................. 74

B.2.3 pH Model ................................................................................................................ 76

B.3 Diffusion Coefficient ..................................................................................................... 77

B.3.1 Coefficient of horizontal diffusion.......................................................................... 77

B.3.2 Coefficient of vertical diffusion .............................................................................. 77

APPENDIX C ......................................................................................................................... 78

MATLAB™ CODES ............................................................................................................... 78

C.1 Program Codes for Model Validation ........................................................................... 78

C.2 Matlab™ Codes for Forecasting.................................................................................... 83

APPENDIX D ......................................................................................................................... 86

Simulation Results and Statistical Analysis ......................................................................... 86

v
D.1 Simulation Results......................................................................................................... 86

D.2 Statistical Analysis Using Paired t-Test in Excel .......................................................... 90

D.2.1. Temperature ........................................................................................................... 90

D.2.2 Dissolved Oxygen ................................................................................................... 93

D.2.3 pH ........................................................................................................................... 96

APPENDIX E ....................................................................................................................... 100

APPENDIX F ....................................................................................................................... 103

DOCUMENTATION ............................................................................................................ 103

vi
LISTS OF FIGURES
Figure 1: Theoretical Framework of the Study (Orlob, et al., 1983) ...................................... 29

Figure 2: Conceptual Framework of the Study....................................................................... 33

Figure 3: Study Area. .............................................................................................................. 34

Figure 4: Selection of Boundary ............................................................................................. 35

Figure 5: Solution Scheme (S. A. Mirbagheri, 2009) ............................................................. 42

Figure 6: Solution Methodology ............................................................................................. 44

Figure 7: Theoretical Vs. Actual Temperature for (a) I1 (b) I2 (c) I3. ..................................... 49

Figure 8: I1 Theoretical Vs. Actual pH .................................................................................. 50

Figure 9: Theoretical Vs. Actual DO for (a) I1 (b) I2 (c) I3................................................... 51

Figure 10: (a) Initial and (b) Final Temperature ..................................................................... 52

Figure 11: (a) Initial and (b) Final DO .................................................................................... 53

Figure 12: (a) Initial and (b) Final pH .................................................................................... 54

Figure 13: First discharge for the chosen boundary. A continuous flowing water coming

from the residential houses. ................................................................................................... 103

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

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. ........................................... 104

Figure 17: Sample collection from the chosen sampling points. The sampling bottles was

cupped under water to prevent air bubbles. .......................................................................... 104

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

vii
Figure 19: On-site water analysis using the equipment devices (Thermometer, pH meter, and

DO meter). ............................................................................................................................. 105

Figure 20: On-site chemical testing of pH at different sampling points. .............................. 105

Figure 21: Measuring of water depth at different 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

Status Report, 2006)................................................................................................................... 6

Table 3: Water Quality Guidelines for Primary Parameter....................................................... 7

Table 4: Effluent Standards....................................................................................................... 7

Table 5: Categories of Model (Marion, 2008). ....................................................................... 15

Table 6: Coefficients to Compute Saturation Vapor Pressure. ............................................... 21

Table 7: R2 of the Developed Model ....................................................................................... 24

Table 8: Typical values of the decay coefficient for various types of wastes. From [Davis and

Cornwell, 1991] ....................................................................................................................... 41

Table 9: Actual vs. Theoretical for Dissolved Oxygen. .......................................................... 46

Table 10: Actual Vs. Theoretical for Temperature Model. ..................................................... 47

Table 11: Actual vs. Theoretical for pH Model. ..................................................................... 47

Table 12: P-Value of Actual Vs. Theoretical. ......................................................................... 48

Table 13: Prediction of Temperature. ..................................................................................... 55

Table 14: Prediction of Dissolved Oxygen. ............................................................................ 56

Table 15: Prediction for pH .................................................................................................... 56

ix
Chapter 1

INTRODUCTION

1.1 Background of the Study

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

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

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

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

the next generations.

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

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

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

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

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

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

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

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

quality.

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

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

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

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

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

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

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

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

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).

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

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

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

formulate solutions.

1.2 Statement of the Problem

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

It aimed to answer the following questions:

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

the measured values?

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

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

Tuguegarao River?

1.3 Objectives of the Study

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

Tuguegarao River.

Specifically, it aimed to:

1. Compare the difference of the simulated value and the actual values of water quality

parameters using a statistical tool paired T-test.

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.

1.4 Scope and Limitations

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

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

quality of the river and developed a model that will serve as a forecasting tool for the different

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

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

collection of data was from December 20, 2018 to April 28, 2019 with 14 days’ interval.

1.5 Significance of the Study

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

Different agencies such as Environmental Management Bureau - Department of Environment

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

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

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

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

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

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

1.6 Locale of the Study

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

and collection were done at the selected boundaries of Pinacanauan de Tuguegarao River. A

length of 200 meters long and a width of 121 meters was selected as the sampling site in the

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

Resources.

3
1.7 Definition of Terms

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

from areas of higher concentration to areas of lower concentration

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

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

hydraulic conductivity distribution

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

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

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

logarithmic scale.

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

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

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

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

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

temperature and in to the region with the lower temperature.

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

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

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

is evaluated.

4
Chapter 2

REVIEW OF RELATED LITERATURE

2.1 Pinacanauan de Tuguegarao River

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

Cagayan Valley. It is also renowned tourism spot in the province. The clear Pinacanauan 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,

Gazmen, & Quizon, 2016)

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

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

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

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

(Aina & Asedipe, 1996).

2.2 Water Quality Parameters

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

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

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

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

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

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

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

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

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

Water Body Water Quality Parameter


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

Table 2: Number of classified inland surface water bodies (EMB National Water Quality
Status Report, 2006)
Classification Definition Number
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.

Table 3: Water Quality Guidelines for Primary Parameter

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

Table 4: Effluent Standards

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

2.3. Governing Laws

2.3.1 Conservation Law

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

and accumulate (Duncan, 2017). This principle is expressed as

Accumulation = In - Out + Generation - Consumption (1)

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

mathematically by the following equation:

m
m in  m out  (2)
t

2.3.2 Hydrodynamics and Transport

2.3.2.1 Fick’s First Law

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

flux can be expressed as

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

to the increasing concentration gradient.

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

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

molecular diffusion coefficient Dm (Eldho).

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

C
Molecular diffusion: q   Dm
x

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

2.3.2.2 Mass Transport Phenomena

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

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

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

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

CYCLOPEDIA, 2015).

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

2.3.2.2.1 One-Dimensional (1D) Transport Equation

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

transport along one axis, the x axis.

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

C = the concentration average over the cross section;

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

environment.

2.3.2.2.2 Two-Dimensional (2D) Transport Equation

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

to solve mass transport.

2.3.2.2.3 Three-Dimensional (3D) Transport Equation

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.

2.3.2.3 Heat Transfer

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

Heat Transfer, n.d.).

 T T T    2T  2T  2T  T
 v x  vy  vz   DT  2 _ 2  2    (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.).

The heat transfer equation is express as:

Q = mcpΔT (9)

Where:

Q = heat content in Joules

m = mass

cp = specific heat, J/g °C

10
ΔT = change in temperature

2.3.2.3.1 Conduction

An energy transfers across a system boundary due to a temperature difference by the

mechanism of inter-molecular interactions. The Fourier Law describes conduction rate

equation:

q  -kAT (10)

where:

q = heat flow vector, (W)

k = thermal conductivity, (W/m K)

A = Cross sectional area in direction of heat flow. (m2)

T = Gradient of temperature (K/m)

2.3.2.3.2 Convection

An energy transfers across a system boundary due to a temperature difference by the

combined mechanisms of intermolecular interactions and bulk transport. Convection needs

fluid matter. Newton’s Law of Cooling:

q  hAs T (11)

where:

q = heat flow from surface, a scalar, (W)

h = heat transfer coefficient (which is not a thermodynamic property of the material,

but may depend on geometry of surface, flow characteristics, thermodynamic properties

of the fluid, etc. (W/m2 K)

AS = Surface area from which convection is occurring. (m2)

T  TS - T ∞ = Temperature Difference between surface and coolant. (K)

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:

 = emissivity, which is a surface property (ε = 1 is black body)

 = Steffan-Boltzman constant (5.67 x 10-8 W/m2 K4)

TS = Absolute temperature of the surface (K)

2.4 Numerical Solution of Partial Differential Equations

2.4.1 Finite Difference Method

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

approximated from neighboring values (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 ( 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

O(h n ) is an unknown error term.

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

of its derivatives at point xo then equation 8 for its value at the (nearby) point 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).

2.4.1.1 Implicit and Explicit Finite Difference Method

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).

According to (Wageningen-Kessels van, Lint, Hoogendoorn, & Vuik, 2008), implicit

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

integration method but computationally efficient schemes are in acceptable level.

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

were developed (Subklay & Pochai, 2017).

By using an explicit scheme of finite difference method known as Saulyev’s formula

with quadratic interpolated initial-boundary condition gives the main advantage of

unconditionally stable one–dimensional water-quality model in a stream. Furthermore, the

13
technique proposed is suitable to be used in real-world problem because of its easy to computer-

code and straightforwardness (Samalerk & Pochai, 2018).

2.4.2 Finite Element Method

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

simulation for the spread of pollutants in surface water (Verwer, 1998).

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

are generally used.

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

thus easing decision making.

A mathematical model can either be empirical and mechanistic. Empirical models

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

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

models 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

the biological processes. (Ledder, 2015).

Another classification of models is according to their evolution. Models whose

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

simplifies the categories of models described above using illustrations.

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

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

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

simplified evaluation of the long-term monitoring at upstream and downstream of the

reservoirs (Ruzgiene & Ruzgas, 2014).

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

representation. Zero-dimensional models are 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

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

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

oceans (Loucks & Beek, 2005).

2.5.1.1 Mass-Balance Principles

2.5.1.1.1 Advective transport

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)

Advective transport is water velocity dependent. Particles of pollutants are transported

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  Cyzv x t (16)

2.5.1.1.2 Dispersive transport

The dispersive transport D


T Xo M / T  across a surface area is assumed to be proportional

C
to the concentration gradient times the surface area A at site Xo. Letting 
D Xo L2 / T 
x X  Xo

be the dispersion or diffusion coefficient, the dispersive transport is given by:

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

Dispersion, caused by the variable concentrations in water, could be described using

the Fick’s Law (Benedini & Tsakiris, 2013). The mass crossing the area is:

C
J x yzt  ( E ) x yzt (18)
x

2.5.1.1.3 Mass Transport by Advection and Dispersion

A one-dimensional equation added with the advective and dispersive terms along with

a term at a second surface at site X o  x becomes:

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 

where Q Xo L3 / M  is the flow site Xo (Loucks & Beek, 2005).

A study presented a simple mathematical model for river pollution. The model

consisted of a pair of coupled reaction advection-diffusion equations for pollutant and

dissolved oxygen (Hussain, Atshan, & Najam, 2012).

17
 APS x, t    APS x, t  APS x, t 
   Z  PS x, t dx (20)
t x 2 x

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


 DX     S  X S x, t  (21)
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

measured at different stations of AL-Diwaniya city.

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

waters and is shown as follows.

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

that employed the PDE itself (one-dimensional advective-dispersion equation) and

implemented in COMSOL Multiphysics. The second ones were the analytical model that

employed the analytical solutions of ADE (advective-dispersion equation) and implemented in

MATLAB®.

2.5.2 Formulation of Temperature Model

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

(Herb & Heinz , 2008):

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

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

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

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

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

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,

1973) (Thomann, 1975):

H  H s  H sr  H a  H ar  H br  H e  H c (24)

Where:

H s = shortwave radiation incident to water surface;

H sr = reflected shortwave radiation;

H a = incoming longwave radiation from atmosphere;

H ar = reflected long wave radiation;

H br = back radiation emitted by water body;

H e = energy utilized by evaporation;

H c = energy converted to or from the water body at the surface.

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:

H sc = clear sky solar radiation (kW m-2);

SK = fraction of sky covered by clouds.

The Net Long-Wave Radiation emitted by the atmosphere is computed as (Swinbank, 1963):

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

Where:

19
H na = net long wave atmospheric radiation (kW m-2);

Ta = dry bulb air temperature (C ) .

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

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

H br   w (Tw  273.15) 4 (27)

Where:

Tw = water surface temperature;

 w = emissivity of water surface (0.97);

  Stefan-Boltzmann constant 5.670 x10 8 W/m 2 / K 4 

The evaporative heat loss is computed by:

H e   w L(a1  b1Wa )(es  ea ) (28)

Where:

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

Tw = water temperature (C ) ;

a1 ,b1  Empirical coefficient ( a1  0 to 4.0x10-9 , b1  1x10 9 to 3x10-9 ;

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

Td = dew point temperature in Celsius;

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

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

The convective heat loss in (Bowen, 1926):

T  Td
Br 
Hc
He

 6.19 x10 4 p s 
e s  ea
(29)

Where:

Br = Bowen ratio;

p = air barometric pressure in mb;

Td = dry bulb air temperature (C ) ;

Ts = surface water temperature (C ) .

2.5.3 Formulation of Dissolved Oxygen Model

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

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

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

The mathematical form can also be written as;

C 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

Equation 37 can also be expressed in 2-dimensional mathematical form, the model

becomes (Jolánkai, 2000):

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:

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

k d = CBOD deoxygenation rate coefficient Ln = NBOD concentration

kn = nitrogenous deoxygenation rate coefficients L = CBOD concentration

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

S = sediment oxygen demand u = river velocity

x, y = horizontal and vertical distance in the river D y , D x =diffusion coefficients

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):

dpH pH pH   pH    pH 


u v   Dx    D y   kp (33)
dt x y x  x  y  y 

Where: pH = concentration of pH;

u, v = river velocity;

x, y = horizontal and vertical distance in the river;

D y , D x =diffusion coefficients.

k p = rate constant due to chemical reaction

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

CO2 ,sat  k H PCO2 (35)

Where: k H = Henry’s constant for CO2;

PCO 2 = partial pressure of CO2 (0.00033 atm is generally used).

23
Henry’s constant for CO2 can be calculated using

k H  M CO2 10 ( 2385.73 / TK )14.01840.0152642TK  (36)

Where: M CO2 = Molecular weight of CO2

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

(Tetra Tech, 1983):


14.84350.032786TK 
3404.71 

(40)
k1  10  TK 

 2902.39 
 6.4980.02379TK   (41)
k 2  10  TK 

2.5.5 Coefficient of Determination (R2) of the developed model

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

model in both river is (Fonseca, 2014):

Table 7: R2 of the Developed Model

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

(R2) is 0.839 (Ukpaka & Douglas, 2016).

2.6. Diffusion Coefficients

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

Where: u* = shear velocity;

H = average height;

g = acceleration due to gravity, 9.81 m/s2;

Rh = hydraulic radius;

S = slope of the river

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

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

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

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

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

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

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

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

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

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

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

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

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

2.6.1 Water Quality Modelling in MATLAB®

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

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

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

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

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

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

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

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

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

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

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

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

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

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

groundwater from continuous point source.

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

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

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

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

biological nervous systems such as the brain. Moreover, an ANNs was built, trained and

implemented using MATLAB neural toolbox using back propagation with Levenberg-

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

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

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

28
2.7 Theoretical Framework

Goals and Objectives

Conceptualization

Sensitivity Analysis
Selection of model
type

Computational
Representation

First Calibration and


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

Figure 1: Theoretical Framework of the Study (Orlob, et al., 1983)


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

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

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

essentially deep or shallow. Conceptualization will involve a choice regarding the possible

(spatial) segregation of the water body into a number of discrete segments and layers. Besides

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

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

the water body.

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

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

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

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

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

simplifying assumptions and qualitative interpretations regarding the flow and the transport

process.

Computational representation includes formulation of equations, formulation of

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

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

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

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

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

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

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

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

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

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

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

results, and the choice of the language, are in dependence of the available facilities.

The calibration of the model is one of the most critical, difficult, and valuable steps in

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Sensitivity analysis establishes the relative magnitudes of changes in the simulated

model output responses to changes in the model parameter values. It examines the distribution

of model responses that are possible, given the distributions of estimated parameter values

(Orlob, et al., 1983).

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

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

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

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

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

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

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

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

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

2.8 Conceptual Framework

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

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

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

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

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

32
SEGMENTATION OF PINACANAUAN DE TUGUEGARAO RIVER

- Location of Waste Inputs (Source)


- Location of Boundaries River Reaches

DATA COLLECTION

Water Quality Parameters


- Dissolved Oxygen (DO)
- Temperature
-pH

River Geometry
- Length -Velocity
- Width - Depth

WATER QUALITY MODEL

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

Validation
Model Output
of Model

Figure 2: Conceptual Framework of the Study

33
CHAPTER 3

METHODOLOGY

3.1 Study Area

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.

Figure 3: Study Area.

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

3.3.1 Water Quality Parameters

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

gathered between 9:00 a.m. to 11:30 am.

3.3.1.2 Chemical Method

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.

B. Dissolved Oxygen Measurement

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.

3.3.1.3 Used of Measuring Devices

1. Dissolved Oxygen Measurement

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

measurement sample. Read the result given by the DO meter.

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.

Read the result given by the pH meter.

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.

3.3.2 River Geometry

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:

 Length , width and height of the river

 Number and location of boundaries

 Length between each boundaries

 Location of the intersection point of the sewage and the main river

3.4 Model Formulation

The model formulation for a particular pollutant was based in mass balance principle

and is given as:

Accumulation  inflow - outflow  sources or sinks

The mathematical model, corresponding with initial and boundary conditions, consists

of two - dimensional advection-dispersion mass balance equation of the given pollution

parameter.

The assumptions in such models are:

1. The density of clean water is equal to the density of polluted water.

2. Longitudinal and vertical hydrodynamic dispersion occurs.

3. The depth of the river and the hydraulic radius is similar.

The two-dimensional advection-dispersion model for the conservation of mass of water

quality parameters can be written for a river flow system is as follows:

C C C  2C  2C
u v  Dx 2  D y S
t x y x y 2

Where:

C = concentration of pollutants u, v = water velocity

t = time Dx, Dy = Dispersion Coefficients

x, y = distance S = Sources or sinks

38
3.4.1 Discretization of DO Model

The formulated model for dissolved oxygen is:

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:

C s = concentration of dissolved oxygen at saturation

C = actual concentration of dissolved oxygen

ka = reaeration rate constant

k d = decay rate constant

L = BOD concentration

The formulated model was discretized (See solution in Appendix), and the equation becomes:

  C i 1, j ,t  2C i , j ,t  C i 1, j ,t  C  2C i , j  C i , j 1   C i , j ,t  C i 1, j 


 D x    D y  i , j 1,t   v 
x 2    2   x 
    y   
C i , j ,t 1  t    C i , j ,t
C  C i , j 1,t 
 u i , j ,t   k a C s  C i , j ,t   k d L 
  y 
 

3.4.2 Discretization of Temperature

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

processes:

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

Where:  = density of the water

C p = heat capacity of water

P = depth of the river

H = net heat exchanges

39
Discretizing the model (See solution Appendix), it becomes

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


 Dx    D y  i , j 1,t   v 
  x 2
  y 2
  x 
Ti , j ,t 1  t    Ti , j ,t
T  Ti , j 1,t  H
 u i , j ,t   
  y  PCp 

3.4.3 Discretization of 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 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 )

The model was discretized and becomes:

  C i 1, j ,t  2C i , j ,t  C i 1, j ,t  C  2C i , j  C i , j 1   C i , j ,t  C i 1, j 


 D x    D y  i , j 1,t   v 
x 2    2   x 
    y   
C i , j ,t 1  t    C i , j ,t
 u C i , j ,t  C i , j 1,t   k 
  y 

p

 

3.4 Estimation and Calibration of Reaeration and Decay Rate Coefficient

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

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

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

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

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

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

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

where:

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

V = mean velocity (m/s)

h = mean depth (m)

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

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

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

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

(Thomann and Mueller, 1987).

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

decay rate coefficient is

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

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

using the table below

Waste Type Kd at 20 (day-1)


Raw domestic sewage 0.35-0.70
Treated domestic sewage 0.12-0.23
Polluted river water 0.12-0.23
Table 8: Typical values of the decay coefficient for various types of wastes. From [Davis and

Cornwell, 1991]

3.5 Solution Scheme

The numerical solution of the advection-diffusion equation made use of an implicit

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.

Figure 5: Solution Scheme (S. A. Mirbagheri, 2009)


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

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

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

p  
t x 2 y 2

M (N wi , N Li , t + 1) M (N wi , N Li , t ) M (N wi+1 , N Li , t + 1) 2M (N wi , N Li , t + 1) + M (N wi 1 , N Li , t + 1)
ρp = +
Δt Δx 2

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

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


ρp = Dρ p
Δt Δx 2

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


+
Δy 2

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

3.6 Simulation Methodology

Discretized equations shown for temperature, pH and DO were coded in MATLAB

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

to increase simulation speed.

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

to tend, another conditional statement is set to update the boundary conditions.

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

Is tinst= tend? Yes End

No
Update Boundary
Conditions

Increase time
Counter (tinst+dt)

Compute Temp

Compute pH

Compute DO Cs

Update Initial
Conditions

No Is trem= 0?

Yes

Store Data Temp, pH, DO

Figure 6: Solution Methodology

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

the actual and theoretical values have no significant difference.

45
CHAPTER 4

Results and Discussions

4.1 Comparison of Actual and Simulated Data

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.

Table 9: Actual vs. Theoretical for Dissolved Oxygen.


Dissolved Oxygen (mg/L)
I1 I2 I3
Day
Actual Simulated Actual Simulated Actual Simulated
0 7.662857 7.662857 7.662857 7.662857 7.662857 7.662857
1 7.665 7.662857 5.955 7.859118 6.1 7.732086
2 6.41 7.662857 8.27 5.549542 8.16 6.555333
3 9.03 7.662857 8.19 8.396688 7.56 8.268247
4 8.24 7.662857 7.525 7.610505 7.335 7.879414
5 8.23 7.662857 6.5 7.445306 6.3 7.635829
6 6.95 7.662857 5.22 6.354826 6.615 6.675208
7 5.36 7.662857 5.63 6.494344 4.75 6.868438
8 2.485 7.662857 7.65 4.746155 7.555 4.499862
9 7.3 7.662857 6.29 7.683108 7.003 7.644635
10 6.34 7.662857 7.685 6.771971 7.685 6.718485

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

Table 11: Actual vs. Theoretical for pH Model.

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

such as dissolved oxygen, temperature and pH.

Table 12: P-Value of Actual Vs. Theoretical.

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

4.3 Model Accuracy

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

Figure 8: I1 Theoretical Vs. Actual pH

R2 =0.7116

(c) I3

Figure 8: Theoretical vs. Actual pH for (a) I1 (b) I2 (c) I3.

50
R2 =0.7351

(a) I1 (b) I2

R2 =0.9468

(c) I3

Figure 9: Theoretical Vs. Actual DO for (a) I1 (b) I2 (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

sampling which is caused by the weather conditions.

(a) Initial Temperature (b) Final Temperature


Figure 10: (a) Initial and (b) Final Temperature

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.

(a) Initial DO (b) Final DO


Figure 11: (a) Initial and (b) Final DO

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

showing the flatness or steepness of a coordinate’s elevation, it indicates a coordinate’s pH

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).

(a) Initial pH (b) Final pH


Figure 12: (a) Initial and (b) Final pH

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.

Table 13: Prediction of Temperature.


Temp (ᵒC)
Time(sec) I1 I2 I3
0 23.64282 23.64282 23.64282
1209600 23.64282 23.64282 23.64282
2419200 23.64282 23.64282 23.64282
3628800 23.64282 23.64282 23.64282
4838400 23.64282 23.64282 23.64282
6048000 23.64282 23.64282 23.64282
7257600 23.64282 23.64282 23.64282
8467200 23.64282 23.64282 23.64282
9676800 23.64282 23.64282 23.64282
10886400 23.64282 23.64282 23.64282
12096000 23.64282 23.64282 23.64282
13305600 23.64282 23.64282 23.64282
14515200 23.64282 23.64282 23.64282
15724800 23.64282 23.64282 23.64282
16934400 23.64282 23.64282 23.64282
18144000 23.64282 23.64282 23.64282
19353600 23.64282 23.64282 23.64282
20563200 23.64282 23.64282 23.64282
21772800 23.64282 23.64282 23.64282

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

SUMMARY, CONCLUSION, AND RECOMMENDATION

5.1 Summary and Conclusion

Water quality parameters such as temperature, dissolved oxygen, and pH of

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

discretized model was then simulated using MATLAB™.

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

the water quality of Pinacanauan de Tuguegarao River.

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

0.9858, 0.9468 and 0.7207, respectively.

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

speed is very necessary for simulation and prediction.

58
REFERENCES

(n.d.). Retrieved from UNESCO.org:

http://echo2.epfl.ch/VICAIRE/mod_2/chapt_9/main.htm

(n.d.). Retrieved from https://nptel.ac.in/courses/112104030/pdf/lecture6.pdf

(n.d.). Retrieved from https://nptel.ac.in/courses/112104030/pdf/lecture6.pdf

(n.d.). Retrieved from https://nptel.ac.in/courses/112104030/pdf/lecture6.pdf

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.

Aina, & Asedipe. (1996).

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.

Ani, E. C. (2010). Modelling of Pollutant Transport in Rivers: Process Engineering

Approach. PhD Thesis, University of Cluj-Napoca, Faculty of Chemistry and

Chemical Engineering.

Ani, E.-C. (2010). Modelling Of Pollutant Transport in Rivers: Process Engineering

Approach.

Baca, R., & Arnett, R. C. (1976). A limnological model for eutrophic lakes and

impoundments. Battelle, Pacific Northwest Laboratories, forU. SEPA, Office of

Research and Development.

Benedini, M. (2011). Water Quality Models for Rivers and Streams. State of the Art and

Future Perspectives . European Water .

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

surface. Physics Review 27, 779.

Bowen, J. D., Perry, D. N., & Bell, C. D. (2014, November). Hydrologic and Water Quality

Model Development Using Simulink. Journal of Maine Science and Engineering,

616-629. doi:10.3390

Bowie, G. L., Mills, W. B., Porcella, D. B., Campbell, C. L., Pagenkopf, J. R., Rupp, G. L., . .

. Gherini, S. A. (1985). Rates, Constant, and kinetics Formulations in Surface Water

Quality Modeling.

Churuksaeva, V., & Starchenko, A. (2015). Mathematical Modeling of a River Stream Based

on a Shallow Water Approach. Procedia Computer Science.

D.M.Causon, & Mingham, C. G. (2010). Introductory Finite Difference Methods for PDES.

Mingham & Ventus Publishing ApS.

Dawood, A. S., Hussain, H. K., & Hassan, M. (2016, October). Modeling of River Water

Quality Parameters Using Artficial Neural Network - A Case Study. International

Journal of Advances in Mechanical and Civil Engineering, III(5), 51-54.

Dayag, C. R., Gazmen, M. N., & Quizon, R. A. (2016). Water Quality Monitoring

Assessment of Pinacanauan de Tuguegarao Rive Using WQI and GIS. Undergraduate

Thesis, CAgayan State University, Chemical Engineering, Tuguegarao.

DENR-EMB. (2014). Natural Water Quality Status Report.

Easa, A., & Abou-Rayan, A. (2010). Domestic Wastewater Effect on the Pollution of the

Groundwater in Rural Areas in Egypt. Fourteenth International Water Technology

60
Conference, IWTC, pp. 909-923. Retrieved from

https://pdfs.semanticscholar.org/4b27/3b40fb9e49934bc0f67073adeff954752c1d.pdf

Edinger, J. (1979). A hydrodynamic two-dimensional reservoir model: development and test

application to Sutton Reservoir Elk River, West Virginia.

Eldho, T. (n.d.). Watershed Management. Retrieved from NPTEL:

https://nptel.ac.in/courses/105101010/downloads/Lecture29.pdf

(2006). EMB National Water Quality Status Report.

Espejo, J., Tungpalan, J., Negi, V., & Alex, S. (2015). Physicochemical and Bacteriological

Analysis of Water in Pinacanauan River Along Barangay Callao, Pataguele, and

Cabbo Penablanca Cagayan.

Flow-3D. (2019). flow3d. Retrieved from https://www.flow3d.com/resources/cfd-

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).

Reaeration Coefficient Estimate: New Parameter for Predictive Equations. Springer

International Publishing AG 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

I: Model development and baseflow conditions.

Houcque, D. (2005). Introduction to MATLAB for Engineering Students. Illinois.

61
Hussain, S. A., Atshan, W. G., & Najam, Z. M. (2012, October). Mathematical Model for the

Concentration of Pollutants Dissolved Oxygen in Diwaniya River (Iraq). American

Journal of Scientific Reasearch(78), 33-37.

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

rivers: speciation, sources and biological significance. Science of the Total

Environment, 79–109.

Jolánkai, D. G. (2000). Description of the CAL programme on Water Quality Modelling

Version 2 Baic River and Lake Water Model Quality.

Kang, G. K., Gao, J., & Xie, G. (2017). Data-driven Water Quality Analysis and Prediction:

A Survey. Science Direct.

Kashefipour, S. M., & Roshanfekr, A. (2012). Numerical Modelling of Heavy Metals

Transport Processes in Riverine Basins . In Numerical Modelling . In Tech.

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

Dynamical Systems. Springer Undergraduate Texts in Mathematics and Technology.

Lindenschmidt, D.-I. K.-E. (2005). River water quality modelling for river basin and water

resources management with a focus on the Saale River, Germany.

62
Livshits, D. I., & Coleman, N. (2008). Mathematical Modeling.

Loucks, D. P., & Beek, E. (2005). Water Resources Systems Planning and Management, An

Introduction to Methods,Models and Applications. UNESCO PUBLISHING.

Loucks, D. P., & Beek, E. (2005). Water Resources Systems Planning and Management, An

Introduction to Methods,Models and Applications. UNESCO PUBLISHING.

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

Control Structure. IAHR .

Marion, G. (2008). An Introduction to Mathematical Modelling.

Mirbaghery, S. A., Abaspour, M., & Zamani, K. (2009). Mathematical Modelling of Water

Quality in River Systems. 31-41.

Mulla, R. K., & Bhosale, S. M. (2016, August). Water Quality Analysis and Simulation of

Panchaganga River Using Matlab. International Journal of Engineering Sciences &

Research Technology, 613-620. doi:10.5281/zenodo.60106

multiphysics CYCLOPEDIA. (2015, January 14). Retrieved from COMSOL:

https://www.comsol.com/multiphysics/what-is-mass-transfer

Multiphysics CYCLOPEDIA. (2015, January 15). Retrieved from COMSOL:

https://www.comsol.com/multiphysics/navier-stokes-equations

Nave, R. (n.d.). Heat Transfer. Retrieved from Hyperphysics: http://hyperphysics.phy-

astr.gsu.edu/hbase/thermo/heatra.html

Nave, R. (n.d.). Hyperphysics. Retrieved from Conservation Laws: http://hyperphysics.phy-

astr.gsu.edu/hbase/index.html

63
Nikishkov, G. P. (2004). INTRODUCTION TO THE FINITE.

Orlob, G. T. (1983). Mathematical modelling of water quality: Streams, Lakes, and

Reservoirs. A Wiley-Interscience Publication.

Orlob, G. T., , Bruce Beck, M., Harleman, D. F., Jacquet, J., Jorgesnen, S. E., . . . Watanabe,

M. (1983). Mathematical Modeling of Water Quality: Streams, Lakes, and Reservoirs.

(G. T. ORLOB, Ed.) Benicia, California: A Wiley-Interscience Publication.

Quarteroni, A. (2009). Mathematical Models in Science and Engineering. 56, 1.

Raterman, B., Schaars, F. W., & Griffioen, M. (2000). GIS and MATLAB Integrated

Groundwater Modelling.

Ruzgas, Inga Ruzgiene, & Tomas. (2014). MATHEMATICAL MODELING OF WATER

QUALITY CHANGE IN EASTERN EUROPEAN RIVER. International Journal of

Science, Environment and Technology.

Ruzgiene, I., & Ruzgas, T. (2014). MATHEMATICAL MODELING OF WATER

QUALITY CHANGE IN EASTERN EUROPEAN RIVER. International Journal of

Science, Environment and Technology.

Ryan, P., & Harleman, D. R. (1973). An analytical and experimental study of transient

cooling pond behavior.

S. A. Mirbagheri, M. A. (2009). Mathematical modeling of water quality in river systems.

EWRA, 31-41.

Samalerk, P., & Pochai, N. (2018). Numerical Simulation of a One-Dimensional Water-

Quality Model in a Stream Using a Saulyev Technique with Quadratic Interpolated

Initial-Boundary Conditions. Hindawi.

64
Serway, R. A., Faughn, J. S., Vuille, C., & Bennett, C. A. (2006). College Physics (7th ed.).

U.S.A.: Thomson Books/Cole.

Sileika, A. S. (1996). Agriculture Nitrogens Impact on Water Quality in Lithuanian Rivers.

Environmental Research, Engineering and Management.

Skorzinski, E., Shacham, M., & Brauner, N. (2009). A Simulation Program for Modelling

Pollutant Dispersion for Educaional Applications. Elsevier, 1233-1238.

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.

Journal of Interdisciplinary Mathematics.

Swinbank, W. (1963). Long wave radiation from clear skies. Quarterly Journal of the Royal

Meteorological Society 89, 339-348.

Tetra Tech, I. (1983). The Integrated Lake-Watershed Acidification Study, Volume 1: Model

Principles and Application Procedures. . Electric Power Research Institute.

The University of Iowa. (n.d.). Retrieved from

http://www2.physics.uiowa.edu/~rmerlino/1701_F_16/1701_conservation_laws.pdf

Thomann, R. (1975). Mathematical modeling of phytoplankton in Lake Ontario.

Ukpaka, C., & Douglas, I. E. (2016). Model Development for pH, Salinity and Conductivity

Monitoring and Predicting the Diffusion Concentration in Stagnant Water. Chemical

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

and Explicit Numerical Methods for Macroscopic Traffic Flow Models.

Weisstein, E. W. (2018). MathWorld: Finite Volume Method.

66
APPENDIX A

Water Quality Parameters, River Geometry, and Meteorological Data

A.1 Actual Data

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

A.2 Average Height of the River

Day Average Height (m)


Day 1 1.173333
Day 2 6.039467
Day 3 1.076667
Day 4 1.2
Day 5 0.683333
Day 6 1.393333
Day 7 0.923333
Day 8 0.38
Day 9 0.826667
Day 10 1.95
Average: 1.56461

A.3 Average Velocity

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

A.4 Slope of the River

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

December January February March


2018 2019 2019 2019
Dry Bulb Temp. (°C) 24.9 23.6 24.9 33.5
Wet Bulb Temp(°C) 22.5 21.6 21.1 22.5
Station Press. (hPa) 1008 1010.2 1009.7 1006.9
Mean Dew Point (°C) 22.2 20.6 19.5 20.8
Mean Relative Humidity 84% 83% 71% 70%
Wind Ave. Speed (m/s) 2 2 1 1
Mean Cloudiness (Oktas) 6 0 4 4
Vapor Pressure (mmHg) 26.42 24.86 23.37 24.86
Source: Philippine Atmospheric, Geophysical and Astronomical Services Administration
(PAGASA)-Tuguegarao City

Clear Sky Solar Radiation


(kW-hr/m^2/day)
December, 2018 2.9225
January, 2019 3.974839
February, 2019 5.573
March, 2019 5.702903
April, 2019 -130.954
Source: https://power.larc.nasa.gov/data-access-viewer/

71
APPENDIX B

Model Discretization and Calculation of Sources/Sinks

B.1 Discretization of Formulated Model

B.1.1 Dissolved Oxygen Model

The formulated model for dissolved oxygen is:

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

and it was discretized, the equation becomes

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

Ci , j ,t 1  Ci , j ,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 2
y 2
u Ci , j ,t  Ci  j , j ,t  u Ci , j ,t  Ci , j 1,t 
  k a C sat  Ci , j ,t   k d L
x y

 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

   k a C sat  Ci , j ,t   k d L 
 x y 

B.1.2 Temperature Model

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  Pc p

The solution for the discretization of the model is

T   T    T   T T  H
  Dx    D y    u v  0
t x  x  y  y   x y  Pc p

Assume u = v

72
T  2T  2T T T H
 Dx 2  D y 2  u u  0
t x y x y Pc p

Ti , j ,t 1  Ti , j ,t  Ti 1, j ,t  2Ti , j ,t  Ti 1, j ,t   Ti , j 1,t  2Ti , j ,t  Ti , j 1,t 


 D x  
  D  
t  y 2
2 y
 x   
 Ti , j ,t  Ti 1, j ,t   Ti , j ,t  Ti , j 1,t  H
- u   u  
 x   y  Pc p

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


 Dx  
  D  
 y 2
2 y
  x   
Ti , j ,t 1  t    Ti , j ,t
T  Ti 1, j ,t   Ti , j ,t  Ti , j 1,t  H
 u i , j ,t   u   
  x   y  Pc 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

and it was discretized, the equation becomes

Ci , j ,t 1  Ci , j ,t u Ci , j ,t  C i  j , j ,t  u C i , j ,t  C i , j 1,t  D x C i 1, j ,t  2C i , j ,t  Ci 1, j ,t 


  
t x y x 2
D y Ci , j 1,t  2C i , j ,t  C i , j 1,t 
  kp
y 2

Ci , j ,t 1  Ci , j ,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 2 y 2
u Ci , j ,t  Ci  j , j ,t  u Ci , j ,t  Ci , j 1,t 
  kp
x 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 

B.2 Calculation of the Sources/Sinks

B.2.1 Dissolved Oxygen

S  k a (C s  C )  k d L

5V 50.30618
k a (20C )    0.72599
h 5/3
1.564615 / 3
For the calibration of reaeration rate ka:

k a  k a (20C ) x1.024 (T 20)

k a  0.72599 x1.02426.434520

1
k a  0.84568
day

B.2.2 Temperature model

H
S
Pc p

The net external heat flux can be

H  H S  H SR  H A  H AR  H BR  H E  H C

Net Short Wave Solar Radiation H SN 

H SN  H S  H SR  0.94 H SC 1  0.65SK 2  

 0.94 779.091 1  0.650.414
2

 650.7868275 W/m 2

Net atmospheric radiation H AN 

H AN  H A - H AR  5.16432 10 13
1  0.17 SK  TA  273.166

74
H AN  H A - H AR  5.16432  10 1  0.17 SK  TA  273.166
13

 5.16432  10 -13
1  0.17  0.414 27.26  273.166
 392.1994804 W / m 2

Long Wave Back radiation H BR 

H BR  TS
4

 
H BR  0.97  5.670  10 -8 26.4507  273.15
4

H BR  0.4431248322 W / m 2

Evaporative Heat Flux H E 

H E  W L a  bW  es - ea 

H E  W L a  bW  es - ea 

L = (597 - 0.57 × TS )

= (597 - 0.57 × 26.4507) (4184)

= 2343.766255 W / m 2

eS = a j + b jTs

= (- 22.29) + (2.151) (26.4507)


= 34.6054557

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

Convective heat flux H C 

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

hcp
1.56461 m  997.05 kg3  4182 J
m kg
 0.00005575964433

B.2.3 pH Model

Henry’s Law Equilibrium

CO2 ,sat  k H PCO2

Henry’s constant for CO2 can be calculated using

At Tave = 26.4507 + 273.15 = 299.6007 K

k H  M CO2 10 ( 2385.73 / TK )14.01840.0152642TK 

 2385.73 
 299.600714.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 

From the reactions, the equilibrium constants are:

 3404.71 
14.84350.032786 299.6007 299.6007 
k1  10  

mg
k1  4.53557571x10 7
L

76
 2902.39 
 6.4980.02379299.6007 299.6007 
k2  10  

mg
k 2  4.819166316 x10 11
L

B.3 Diffusion Coefficient

B.3.1 Coefficient of horizontal diffusion

Dx  cL4 / 3

Dx  0.01200 
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

C.1 Program Codes for Model Validation

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

while t_inst <= t_end

%update boundary conditions

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;

pH(1,u,t) = -0.00001.*x.^2 + 0.0024.*x + 6.6976;


pH(1,v,t) = 6.8;
pH(121,x,t) = 0.002.*x + 6.45;
pH(200,y,t) = 6.85;

DO(1,u,t) = 0.00002.*x.^2 - 0.0032.*x + 7.5831;


DO(1,v,t) = 7.58;
DO(121,x,t) = 0.0008.*x + 7.635;
DO(200,y,t) = 7.86;

elseif t_inst == 14*3600*24

Temp(1,u,t) = -0.00002.*x.^2 -0.008.*x + 23.251;


Temp(1,v,t) = 23.75;
Temp(121,x,t) = 22.75;
Temp(200,y,t) = 22.75;

pH(1,u,t) = -0.00009.*x.^2 + 0.0146.*x + 6.7355;


pH(1,v,t) = 6.9;
pH(121,x,t) = 0.001.*x + 7.05;
pH(200,y,t) = 7;

DO(1,u,t) = -0.0004.*x.^2 + 0.0847.*x + 0.7457;


DO(1,v,t) = 5.245;
DO(121,x,t) = 0.0044.*x + 5.58;
DO(200,y,t) = 5.54;

elseif t_inst == 28*3600*24

Temp(1,u,t) = -0.00007.*x.^2 + 0.0068.*x + 23.993;


Temp(1,v,t) = 24.3;
Temp(121,x,t) = 0.0025.*x + 24.375;
Temp(200,y,t) = 24;

pH(1,u,t) = -0.00001.*x.^2 + 0.0015.*x + 5.5985;


pH(1,v,t) = 6.9;
pH(121,x,t) = 0.0005.*x + 6.825;
pH(200,y,t) = 6.9;

DO(1,u,t) = -0.00004.*x.^2 + 0.0042.*x + 8.2458;


DO(1,v,t) = 8.45;
DO(121,x,t) = -0.0024.*x + 8.84;
DO(200,y,t) = 8.4;

elseif t_inst == 42*3600*24

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;

pH(1,u,t) = -0.0003.*x.^2 + 0.0391.*x + 5.5111;


pH(1,v,t) = 5.2;
pH(121,x,t) = 0.019.*x + 4.05;
pH(200,y,t) = 5.4;

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;

elseif t_inst == 56*3600*24

Temp(1,u,t) = -0.00001.*x.^2 -0.0005.*x + 26.251;


Temp(1,v,t) = 26.35;
Temp(121,x,t) = 0.008.*x + 25.6;
Temp(200,y,t) = 26;

pH(1,u,t) = 0.00002.*x.^2 - 0.0051.*x + 7.1551;


pH(1,v,t) = 6.85;
pH(121,x,t) = -0.001.*x + 6.95;
pH(200,y,t) = 6.95;

DO(1,u,t) = -0.00003.*x.^2 + 0.0016.*x + 7.5235;


DO(1,v,t) = 8.2;
DO(121,x,t) = -0.0013.*x + 7.8275;
DO(200,y,t) = 7.445;

elseif t_inst == 70*3600*24

Temp(1,u,t) = 0.00008.*x.^2 - 0.0161.*x + 27.516;


Temp(1,v,t) = 26;
Temp(121,x,t) = 0.0075.*x + 26.625;
Temp(200,y,t) = 27;

pH(1,u,t) = -0.0005.*x.^2 + 0.0798.*x + 2.7107;


pH(1,v,t) = 3.755;
pH(121,x,t) = 0.0082.*x + 5.8325;
pH(200,y,t) = 6.86;

DO(1,u,t) = 0.0001.*x.^2 - 0.02.*x + 7.1699;


DO(1,v,t) = 6.9;
DO(121,x,t) = -0.001.*x + 6.45;
DO(200,y,t) = 6.35;

elseif t_inst == 84*3600*24

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;

pH(1,u,t) = 0.00002.*x.^2 - 0.0051.*x + 7.2051;


pH(1,v,t) = 6.95;
pH(121,x,t) = 0.0005.*x + 6.975;
pH(200,y,t) = 7;

DO(1,u,t) = -0.0003.*x.^2 + 0.039.*x + 4.6413;


DO(1,v,t) = 5.855;
DO(121,x,t) = 0.0007.*x + 6.485;
DO(200,y,t) = 6.49;

elseif t_inst == 98*3600*24

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;

pH(1,u,t) = 0.00003.*x.^2 - 0.0098.*x + 7.0098;


pH(1,v,t) = 6.9;
pH(121,x,t) = -0.0005.*x + 6.925;
pH(200,y,t) = 6.25;

DO(1,u,t) = -0.0002.*x.^2 + 0.0441.*x + 2.5411;


DO(1,v,t) = 2.765;
DO(121,x,t) = 0.005.*x + 2.4975;
DO(200,y,t) = 4.735;

elseif t_inst == 112*3600*24

Temp(1,u,t) = 0.00007.*x.^2 - 0.0119.*x + 31.012;


Temp(1,v,t) = 30.25;
Temp(121,x,t) = 0.0075.*x + 30.625;
Temp(200,y,t) = 30.75;

pH(1,u,t) = 0.000007.*x.^2 - 0.0017.*x + 7.0517;


pH(1,v,t) = 7;
pH(121,x,t) = 7;
pH(200,y,t) = 7;

DO(1,u,t) = -0.00006.*x.^2 + 0.0083.*x + 7.3068;


DO(1,v,t) = 7.43;
DO(121,x,t) = 0.0008.*x + 7.5225;
DO(200,y,t) = 7.685;

elseif t_inst == 126*3600*24

Temp(1,u,t) = -0.00003.*x.^2 + 0.0066.*x + 30.343;


Temp(1,v,t) = 30.2;
Temp(121,x,t) = 0.0045.*x + 30.325;
Temp(200,y,t) = 31.35;

pH(1,u,t) = -0.00006.*x.^2 + 0.0144.*x + 7.0357;


pH(1,v,t) = 6.95;
pH(121,x,t) = -0.003.*x + 8.05;
pH(200,y,t) = 7.9;

DO(1,u,t) = -0.00003.*x.^2 + 0.0029.*x + 6.1871;


DO(1,v,t) = 6.225;
DO(121,x,t) = -0.0012.*x + 6.505;
DO(200,y,t) = 6.77;

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,1) = -0.0005.*x.^2 + 0.0798.*x + 2.7107;


pH(1,v,t,1) = 3.755;
pH(121,x,t,1) = 0.0082.*x + 5.8325;
pH(200,y,t,1) = 6.86;

DO(1,u,t,1) = -0.0004.*x.^2 + 0.0847.*x + 0.7457;


DO(1,v,t,1) = 5.245;
DO(121,x,t,1) = 0.0044.*x + 5.58;
DO(200,y,t,1) = 5.54;

Temp (1,u,t,2) = Temp (1,u,t,1);


Temp (1,v,t,2) = Temp (1,v,t,1);
Temp (121,x,t,2) = Temp (121,x,t,1);
Temp (200,y,t,2) = Temp (200,y,t,1);

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);

while t_inst <= t_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)-
(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

xlswrite1('C:\Users\Laica Manaligod\Documents\matlab\Simulation Result


2019.xlsx',t_inst,'Simulation Result',strcat('A',int2str(i)))
xlswrite1('C:\Users\Laica Manaligod\Documents\matlab\Simulation Result
2019.xlsx',Temp(60,2,t+1),'Simulation Result',strcat('B',int2str(i)))
xlswrite1('C:\Users\Laica Manaligod\Documents\matlab\Simulation Result
2019.xlsx',Temp(60,100,t+1),'Simulation Result',strcat('C',int2str(i)))
xlswrite1('C:\Users\Laica Manaligod\Documents\matlab\Simulation Result
2019.xlsx',Temp(60,199,t+1),'Simulation Result',strcat('D',int2str(i)))
xlswrite1('C:\Users\Laica Manaligod\Documents\matlab\Simulation Result
2019.xlsx',pH(60,2,t+1),'Simulation Result',strcat('F',int2str(i)))
xlswrite1('C:\Users\Laica Manaligod\Documents\matlab\Simulation Result
2019.xlsx',pH(60,100,t+1),'Simulation Result',strcat('G',int2str(i)))
xlswrite1('C:\Users\Laica Manaligod\Documents\matlab\Simulation Result
2019.xlsx',pH(60,199,t+1),'Simulation Result',strcat('H',int2str(i)))
xlswrite1('C:\Users\Laica Manaligod\Documents\matlab\Simulation Result
2019.xlsx',DO(60,2,t+1),'Simulation Result',strcat('J',int2str(i)))
xlswrite1('C:\Users\Laica Manaligod\Documents\matlab\Simulation Result
2019.xlsx',DO(60,100,t+1),'Simulation Result',strcat('K',int2str(i)))
xlswrite1('C:\Users\Laica Manaligod\Documents\matlab\Simulation Result
2019.xlsx',DO(60,199,t+1),'Simulation Result',strcat('L',int2str(i)))

i = i+1;

end

t_inst = t_inst + dt

end

xlswrite1('C:\Users\Laica Manaligod\Documents\matlab\Simulation Result


2019.xlsx',Temp(:,:,t+1),'Temp','A1')
xlswrite1('C:\Users\Laica Manaligod\Documents\matlab\Simulation Result
2019.xlsx',DO(:,:,t+1),'DO','A1')
xlswrite1('C:\Users\Laica Manaligod\Documents\matlab\Simulation Result
2019.xlsx',pH(:,:,t+1),'pH','A1')

85
APPENDIX D

Simulation Results and Statistical Analysis

D.1 Simulation Results

Time Temp 1 Temp 2 Temp 3


0 23.6428172525092 23.64282 23.64282
1209600 23.6427271808284 23.4927 23.53266
2419200 23.6427271809652 23.74208 22.35309
3628800 23.6427271812663 24.29071 23.61278
4838400 23.6427271804178 22.74456 23.15118
6048000 23.6427271823886 26.33561 25.37
7257600 23.6427271821970 25.98648 25.93097
8467200 23.6427271826076 26.73461 26.07888
9676800 23.6427271835656 28.48026 27.53545
10886400 23.6427271845236 30.22591 28.79984
12096000 23.6427271844963 30.17603 28.7533

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

t-Test: Paired Two Sample for Means (Day 1)


Actual Theoretical
Mean 23.6 23.75124
Variance 1.89E-29 0.012854
Observations 3 3
Pearson Correlation 1.28E-14
Hypothesized Mean Difference 0
df 2
t Stat -2.310551
P(T<=t) one-tail 0.073541
t Critical one-tail 2.919986
P(T<=t) two-tail 0.147081
t Critical two-tail 4.302653

t-Test: Paired Two Sample for Means (Day 2)


Actual Theoretical
Mean 23 23.123667
Variance 0.25 0.2163682
Observations 3 3
Pearson Correlation 0.965454
Hypothesized Mean Difference 0
df 2
t Stat -1.6293
P(T<=t) one-tail 0.122403
t Critical one-tail 2.919986
P(T<=t) two-tail 0.244805
t Critical two-tail 4.302653

t-Test: Paired Two Sample for Means (Day 3)


Actual Theoretical
Mean 24.56667 24.007003
Variance 0.003333 0.1386026
Observations 3 3
Pearson Correlation -0.88355
Hypothesized Mean Difference 0
df 2
t Stat 2.285333
P(T<=t) one-tail 0.074824
t Critical one-tail 2.919986
P(T<=t) two-tail 0.149649
t Critical two-tail 4.302653

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

t-Test: Paired Two Sample for Means ( Day 5)


Actual Theoretical
Mean 26.08333 25.16073
Variance 0.023333 1.732692
Observations 3 3
Pearson Correlation -0.9603
Hypothesized Mean Difference 0
df 2
t Stat 1.09181
P(T<=t) one-tail 0.19445
t Critical one-tail 2.919986
P(T<=t) two-tail 0.3889
t Critical two-tail 4.302653

t-Test: Paired Two Sample for Means (Day 6)


Actual Theoretical
Mean 26.66667 25.7269867
Variance 0.333333 3.30426566
Observations 3 3
Pearson Correlation 0.992989
Hypothesized Mean 0
Difference
df 2
t Stat 1.305891
P(T<=t) one-tail 0.160795
t Critical one-tail 2.919986
P(T<=t) two-tail 0.32159
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

t-Test: Paired Two Sample for Means (Day 8)


Actual Theoretical
Mean 29.16667 27.28896
Variance 0.083333 10.7185274
Observations 3 3
Pearson Correlation 0.253587
Hypothesized Mean 0
Difference
df 2
t Stat 1.012267
P(T<=t) one-tail 0.208978
t Critical one-tail 2.919986
P(T<=t) two-tail 0.417957
t Critical two-tail 4.302653

t-Test: Paired Two Sample for Means (Day 9)


Actual Theoretical
Mean 30.5 27.94460333
Variance 0 14.27537761
Observations 3 3
Pearson Correlation #DIV/0!
Hypothesized Mean Difference 0
df 2
t Stat 1.171454
P(T<=t) one-tail 0.181043
t Critical one-tail 2.919986
P(T<=t) two-tail 0.362086
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

D.2.2 Dissolved Oxygen

t-Test: Paired Two Sample for Means (Day 1)


Actual Theoretical
Mean 7.678333 7.7513537
Variance 0.000133 0.009908
Observations 3 3
Pearson Correlation 0.769953
Hypothesized Mean 0
Difference
df 2
t Stat -1.39064
P(T<=t) one-tail 0.149431
t Critical one-tail 2.919986
P(T<=t) two-tail 0.298861
t Critical two-tail 4.302653

t-Test: Paired Two Sample for Means (Day 2)


Actual Theoretical
Mean 7.751354 7.662857
Variance 0.009908 0
Observations 3 3
Pearson Correlation #DIV/0!
Hypothesized Mean 0
Difference
df 2
t Stat 1.539905
P(T<=t) one-tail 0.131737
t Critical one-tail 2.919986
P(T<=t) two-tail 0.263474
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

t-Test: Paired Two Sample for Means (Day 4)


Actual Theoretical
Mean 7.996667 7.7175963
Variance 0.143633 0.0203242
Observations 3 3
Pearson Correlation -0.96873
Hypothesized Mean 0
Difference
df 2
t Stat 0.932588
P(T<=t) one-tail 0.224742
t Critical one-tail 2.919986
P(T<=t) two-tail 0.449484
t Critical two-tail 4.302653

t-Test: Paired Two Sample for Means (Day 5)


Actual Theoretical
Mean 7.696667 7.58133067
Variance 0.222358 0.01405966
Observations 3 3
Pearson Correlation 0.42138
Hypothesized Mean 0
Difference
df 2
t Stat 0.459149
P(T<=t) one-tail 0.3456
t Critical one-tail 2.919986
P(T<=t) two-tail 0.6912
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

t-Test: Paired Two Sample for Means (Day 7)


Actual Theoretical
Mean 5.731667 7.00854633
Variance 0.590108 0.35607842
Observations 3 3
Pearson Correlation -0.11327
Hypothesized Mean 0
Difference
df 2
t Stat -2.15829
P(T<=t) one-tail 0.081784
t Critical one-tail 2.919986
P(T<=t) two-tail 0.163568
t Critical two-tail 4.302653

t-Test: Paired Two Sample for Means (Day 8)


Actual Theoretical
Mean 4.288333 5.636291
Variance 2.632608 3.095391
Observations 3 3
Pearson Correlation -0.94119
Hypothesized Mean 0
Difference
df 2
t Stat -0.70072
P(T<=t) one-tail 0.278013
t Critical one-tail 2.919986
P(T<=t) two-tail 0.556025
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

t-Test: Paired Two Sample for Means (Day 10)


Actual Theoretical
Mean 6.544333 7.051104333
Variance 0.158406 0.281396182
Observations 3 3
Pearson Correlation -0.48921
Hypothesized Mean 0
Difference
df 2
t Stat -1.09177
P(T<=t) one-tail 0.194457
t Critical one-tail 2.919986
P(T<=t) two-tail 0.388914
t Critical two-tail 4.302653

D.2.3 pH

t-Test: Paired Two Sample for Means (Day 1)


Actual Theoretical
Mean 6.8 6.827993
Variance 0 0.0117728
Observations 3 3
Pearson Correlation #DIV/0!
Hypothesized Mean 0
Difference
df 2
t Stat -0.44686
P(T<=t) one-tail 0.349353
t Critical one-tail 2.919986
P(T<=t) two-tail 0.698706
t Critical two-tail 4.302653

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

t-Test: Paired Two Sample for Means (Day 3)


Actual Theoretical
Mean 6.25 6.881982
Variance 0.3325 0.018629
Observations 3 3
Pearson Correlation -0.99856
Hypothesized Mean 0
Difference
df 2
t Stat -1.53533
P(T<=t) one-tail 0.132239
t Critical one-tail 2.919986
P(T<=t) two-tail 0.264478
t Critical two-tail 4.302653

t-Test: Paired Two Sample for Means (Day 4)


Actual Theoretical
Mean 5.5 6.3172077
Variance 0.04 0.5029587
Observations 3 3
Pearson Correlation -0.00497
Hypothesized Mean 0
Difference
df 2
t Stat -1.91843
P(T<=t) one-tail 0.097535
t Critical one-tail 2.919986
P(T<=t) two-tail 0.195071
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

t-Test: Paired Two Sample for Means (Day 6)


Actual Theoretical
Mean 6.04 6.889577
Variance 2.130625 0.0192684
Observations 3 3
Pearson Correlation 0.999981
Hypothesized Mean 0
Difference
df 2
t Stat -1.11406
P(T<=t) one-tail 0.190593
t Critical one-tail 2.919986
P(T<=t) two-tail 0.381187
t Critical two-tail 4.302653

t-Test: Paired Two Sample for Means (Day 7)


Actual Theoretical
Mean 7.016667 6.950747
Variance 0.013333 0.03759591
Observations 3 3
Pearson Correlation -0.98514
Hypothesized Mean 0
Difference
df 2
t Stat 0.370354
P(T<=t) one-tail 0.373332
t Critical one-tail 2.919986
P(T<=t) two-tail 0.746663
t Critical two-tail 4.302653

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

t-Test: Paired Two Sample for Means (Day 9)


Actual Theoretical
Mean 7.033333 6.94057567
Variance 0.000833 0.03555722
Observations 3 3
Pearson Correlation -0.70615
Hypothesized Mean 0
Difference
df 2
t Stat 0.765241
P(T<=t) one-tail 0.262049
t Critical one-tail 2.919986
P(T<=t) two-tail 0.524097
t Critical two-tail 4.302653

t-Test: Paired Two Sample for Means (Day 10)


Actual Theoretical
Mean 7.494333 7.3980943
Variance 0.284946 0.402202
Observations 3 3
Pearson Correlation 0.770752
Hypothesized Mean 0
Difference
df 2
t Stat 0.409998
P(T<=t) one-tail 0.360777
t Critical one-tail 2.919986
P(T<=t) two-tail 0.721553
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).

Figure 20: On-site chemical testing of pH at different sampling points.

Figure 21: Measuring of water depth at different points.

105
Figure 22: Setting up for the Measuring of velocity using a table tennis ball and timer.

Figure 23: On-site sampling at the center of the river.

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

You might also like