You are on page 1of 77

Mathematical Modelling of Water Quality in Pinacanauan de Tuguegarao

River
Razel V. Alumit Jr.1, Van Vesper J. Dulliyao2, Denver V. Guillermo3, Rhea D. Mamba4,
Laica C. Manaligod5, Elha E. Maruquin6
College of Engineering
Cagayan State University - Carig Campus
Tuguegarao City, Cagayan 3500
1
razeljr.alumit@gmail.com, 2bhuvan_dulliyao@rocketmail.com,
3
guillermo.denver@yahoo.com, 4rheamamba@gmail.com, 5laicamanaligo@yahoo.com,
6
maruquinelha@gmail.com
Major Adviser: Prof./Engr. Leonard D. Agana

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 determine the effect of different discharge
conditions to the quality of the river.
Keywords: model, water quality, simulated, Pinacanauan River

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, toxic heavy metals and other micro-
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
RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 1 of 77
user to explore new horizons of the imaginations, to compare choices, and to identify pathways
toward superior solutions to practical problems (Orlob, Mathematical modelling of water
quality: Streams, Lakes, and Reservoirs, 1983).
River water quality is of great environmental concern since it is one of the major
available fresh water resources for human consumption (Jarvie, Whitton, & Neal, 1998). One
of the most popular river water in the Province of Cagayan is the Pinacanauan de Tuguegarao
River. This river supplies water to more than 500 hectares of farms in 8 Barangays of
Peñablanca and 4 Barangays of Tuguegarao City (Espejo, Tungpalan, Negi, & Alex, 2015).
Therefore, the main purpose of this study is to develop a comprehensive process
engineering approach on water quality modelling in Pinacanauan de Tuguegarao River by
means of a mathematical model in order to determine the condition of the river water and
formulate solutions.
1.2. 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 (temperature, dissolved oxygen, and pH) using a statistical tool paired T-
test.
2. Compare the accuracy of model with published model.
3. Determine the change in the amount of the different water quality parameters (dissolved
oxygen, temperature, and pH) of Pinacanauan de Tuguegarao River when:
Case 1: An additional pollutant source is present in the river;
Case 2: The classification effluent discharge of Source 1 is at Class B;
Case 3: The classification of effluent discharge of Source 1 is at Class D.
1.3. Conceptual/Theoretical Framework

1.3.1. Theoretical Framework

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

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 2 of 77
According to (Orlob, et al., 1983), the first step of the modeling procedure is
conceptualization. One of its importance is to know the locations of control structures and
tributaries along a river, or to know whether various portions of a lake can be considered
essentially deep or shallow. Conceptualization will involve a choice regarding the possible
(spatial) segregation of the water body into a number of discrete segments and layers. Besides
a spatial separation of the water body it may be necessary to include a grouping and
differentiation of biotic species according to how one visualizes their roles in the ecology of
the water body.
With the conceptualization of the modelling problem comes also model formulation. It
is useful to distinguish between various types of model and to discuss briefly their
characteristics. Formulation of the model according to (UNESCO.org, n.d.) involves a decision
about the type of model, elimination of the relationships that do not affect the output results,
examination of alternative types of models and careful relationships of base data collection.
This information is integrated into a conceptual model, in general through the introduction of
simplifying assumptions and qualitative interpretations regarding the flow and the transport
process.
Computational representation includes formulation of equations, formulation of
methods of solution, and selection of a computer code. In formulation of equations, it is
possible to state the relationships involved in some formal mathematical or statistical way.
Adoption of a hierarchical approach to this process often results in a clearer set of equations in
which the influence of primary and secondary relations can be more easily appreciated. Some
preliminary data may be needed to guide the choice. For the formulation of methods of solution,
only in a few special cases it may be possible to solve the equations analytically, but most
models involve the use of numerical methods for solving partial differential equations,
interpolation, etc. The choice of the appropriate numerical technique is crucial for numerical
stability and accuracy and also for minimizing computational effort. For selection of a
computer code, the decision depends on the project goals. If a modelling is intended only to
provide a first approximation, a simple code may be appropriate. The form of input and output
results, and the choice of the language, are in dependence of the available facilities.
The calibration of the model is one of the most critical, difficult, and valuable steps in
the model application process. After a pollutant transport model is calibrated to a satisfactory
degree, it is often applied to predict and simulate the future contaminant migration.
(UNESCO.org, n.d.) Calibration includes experimental design, model structure identification,
parameter estimation, and verification.. 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.
RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 3 of 77
Sensitivity analysis establishes the relative magnitudes of changes in the simulated
model output responses to changes in the model parameter values. It examines the distribution
of model responses that are possible, given the distributions of estimated parameter values
(Orlob, et al., 1983).
Sensitivity analysis is used before and after calibration mainly to test the responsiveness
and sensitivity of the numerical model to every input parameter. It is useful for: examining the
likely uncertainty in simulation results due to uncertainty in model input parameters, and
examining how well parameters are likely to be estimated from the available data for model
calibration. Sensitivity analysis provides important information on how uncertainties in the
model parameters affect the model results. If the model results are highly sensitive to a
particular parameter, the uncertainty associated with that parameter will significantly affect the
ability of the model to make meaningful interpretations and predictions. It is the mean of
determining the model parameters (UNESCO.org, n.d.).

1.3.2. Conceptual Framework


Figure 2, shows the conceptual framework of the study. The framework is divided into
three major parts- segmentation of Pinacanauan de Tuguegarao River, data collection, and
water quality model. The segmentation of Pinacanauan de Tuguegarao 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.

Figure 2: Conceptual Framework of the Study


RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 4 of 77
2. METHODOLOGY
2.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.

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

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 5 of 77
Figure 4: Selection of Boundary
2.3. Data Collection

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

2.3.2. Chemical Method

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

2.3.4. 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
RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 6 of 77
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.

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

2.3.6. Used of Measuring Devices

2.3.7. 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.3.8. 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.

2.3.9. 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.
2.3.10. 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.
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

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

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 7 of 77
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 were (Mirbaghery, Abaspour, & Zamani, 2009):
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 2  S
t x y x y

Where: C = concentration of pollutants t = time


x, y = distance u, v = water velocity
Dx, Dy = Dispersion Coefficients S = Sources or sinks

2.4.1. Discretization of DO Model

The formulated model for dissolved oxygen is:

C C C  2C  2C
u v  D x 2  D y 2  k a (C s  C )  k d L
t x y x 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 D.1.1), 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   y 2   x 
      
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  

2.4.2. 3.4.2 Discretization of Temperature

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


processes:

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 8 of 77
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
Discretizing the model (See solution Appendix D.1.2), 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 

2.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 2  k p
t x y x y
Where:
k p is the rate constant due to chemical reaction (See appendix D.1.3)

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   y 2   x 
      
C i , j ,t 1  t    C i , j ,t
 u C i , j ,t  C i , j 1,t   k 
  y  p
 
 
2.5. Estimation and Calibration of Reaeration and Decay Rate Coefficient

Reaeration and decay rates are very important parameters in order to predict the
dissolved oxygen concentration in the river (Gonçalves, Silveira, Lopes Júnior, da Luz , &
Simões, 2017). Estimating reaeration and decay rate coefficient requires considerable efforts
since measuring these coefficients is laborious and expensive task. Hence, the coefficients used
in this study were estimated using developed equation. For the estimation of reaerations rates,
M. A. Churchill, H. L. Elmore and R. A. Buckingham's equation (1962) was used.
5V
k a (20C ) 
h5 / 3
where:
ka = reaeration rate at 20°C (/day)
RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 9 of 77
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
Table 1: Typical values of the decay coefficient for various types of wastes. From [Davis and
Cornwell, 1991]
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

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


RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 10 of 77
For a discrete time interval change in Δt, beginning at tn and collecting term in
concentration (C), the resulting finite difference form is:

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

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

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

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

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


ρp = Dρ p
Δt Δx 2

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


+
Δy 2

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

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

M (i, j, t + 1) Dρ p Dρ p
+ 4 M (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

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

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 11 of 77
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.

Figure 6: Simulation Methodology

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 12 of 77
2.8. Model Validation

Once the model was simulated, model testing was performed. The model was then used
to simulate an independent period for which field data under different environmental conditions
were available for comparison and validation. Results of the validation run were then compared
with field data for the same period, and a decision was made as to whether predictions and
observations were close enough to consider the model valid for predictive purposes and this
was done using the paired t-Test in Microsoft Excel 2016. If validation results were not
adequately close, the model process controlling parameters were adjusted accordingly, and the
calibration and validation process was repeated. This was done iteratively until the results were
adequate to consider the model valid for predictive purposes.
2.9. Statistical Tool
The results of the simulated data of Temperature, pH, and dissolved oxygen were
validated using paired t-Test at 5% level of significance.
2.10. Calculation of the Coefficient of Determination (R2)
Coefficient of Determination (R2) was used to measure if the simulated data was a good
for the actual data. The R2 was calculated using MATLAB™ 2013a (See codes at Appendix
E.2).

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 13 of 77
3. RESULTS/FINDINGS AND DISCUSSIONS
3.1. Temperature
Using the developed model for the temperature, the gathered data at the boundaries
were set as initial conditions and were simulated using MATLAB™. The simulated results for
temperature is shown in Table 2 and were compared with the actual values as plotted in Figure
7.
Table 2: Current vs. Simulated for Temperature
TEMPERATURE (°C)
I1 I2 I3
Day
Actual Simulated Actual Simulated Actual Simulated
0 23.64 23.58306 23.642857 23.64 23.64 23.65483
1 23.5 23.60445 23.5 23.49234 23.5 23.44924
2 23.5 23.97994 22.5 22.87967 23 22.1495
3 24.5 23.65148 24.5 24.13597 25 23.54031
4 22.5 24.25581 22.75 22.99172 23 23.2918
5 26.25 26.20346 25.95 26.20466 26.05 26.09612
6 26 26.31361 27 26.99176 27 26.81986
7 27.5 27.48192 26.75 26.99172 27 27.25281
8 29 29.23192 29 29.08876 29.5 29.36588
9 30.5 30.22895 30.5 30.64344 30.5 30.7923
10 30.25 30.19987 30.6 30.55036 31.3 30.85068

It can be observed from the plotted values of temperature that the actual and simulated
values were relatively close to each other. The coefficient of determination was for I1, I2 and I3
were determined to be 0.94974, 0.99514 and 0.97082 respectively. This indicates that the
theoretical values were in good fit with the actual values.

R2= 0.94974 R2= 0.99514

(a) I1 (b) I2

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 14 of 77
R2= 0.97082

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

The simulated initial and final values during the water quality sampling for temperature
was mapped as shown in Figure 8. It can be seen in the maps that both initial and final
temperature conditions displays lower temperature on the left side of the map and higher
temperature on the other side. The change in temperature is also affected by the weather
conditions during the sampling period.

(a) Initial Temperature (b) Final Temperature


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

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 15 of 77
3.2. Dissolved Oxygen
The actual river water quality parameter dissolved oxygen was taken every after 14
days. Water quality model for this parameter was developed using the gathered data at the
boundaries as the initial condition and was simulated using MATLAB™ 2013a software. The
simulated data of dissolved oxygen were compared with current data values, as presented in
Table 3
Table 3: Current vs. Simulated for Dissolved Oxygen.
Dissolved Oxygen (mg/L)
I1 I2 I3
Day
Current Simulated Current Simulated Current Simulated
0 7.66 7.628197 7.66 7.662857 7.66 7.684965
1 7.665 6.603236 7.685 7.489097 7.685 7.35746
2 6.41 6.58578 5.955 3.501366 6.1 5.26473
3 9.03 8.343301 8.27 8.343418 8.16 8.053624
4 8.24 8.197079 8.19 8.240218 7.56 7.845481
5 8.23 7.656159 7.525 7.535051 7.335 7.113582
6 6.95 6.462873 6.5 6.534535 6.3 6.359633
7 5.36 4.562447 5.22 5.693666 6.625 4.625674
8 2.485 4.716579 5.63 3.987134 4.75 5.09569
9 7.39 6.925908 7.345 7.535377 7.555 7.292036
10 6.34 6.225017 6.29 6.251743 7.003 6.210554

The simulated vs. current DO for inner nodes 1, 2, and 3 were plotted and the results
were shown in Figure 9. The coefficient of determination (R2) of the current and theoretical
dissolved oxygen values were also determined using MATLAB™ 2013a software. The
simulated results were in good arguments with the measured values as seen in the graphs

R
2
= 0.89811

R
2
= 0.98112

(a) I1 (b) I2

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 16 of 77
R
2
= 0.98112

(c) I3

Figure 9: Theoretical Vs. Dissolved Oxygen for (a) I1 (b) I2 (c) I3

Water quality contour maps were generated using the simulated initial and final values
of the dissolved oxygen model, as shown in Figure 10. The map shows the changes in the
concentration of the dissolved oxygen at a given distance in the boundary. Dissolved oxygen
is highest at the source, since colder water holds more dissolved oxygen than warm water.
Minute difference of the initial and final values of the concentration of dissolved oxygen were
observed. The contoured map of dissolved oxygen and temperature are directly proportional to
each other (Addy & Green, 1997).

(a) Initial DO (b) Final DO


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

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 17 of 77
3.3. pH

The actual data gathered within the span of study and the simulated data for pH
parameter of the inner nodes, I1, I2 and I3 of the river were shown in Table 4. It was observed
that the values in each node between the current and the simulated have a small differences.
Table 4: Actual vs. Theoretical for pH Model.

pH
I1 I2 I3
Day
Actual Simulated Actual Simulated Actual Simulated
0 6.74 6.758943 6.74 6.729063 6.74 6.74268
1 6.8 6.843442 6.85 6.872851 6.8 6.926767
2 6.9 6.901611 7.2 7.263789 7.2 7.065241
3 6.9 6.190473 5.8 5.739827 6.05 5.858941
4 5.3 5.891832 5.5 6.655944 5.7 5.416848
5 6.9 5.556923 6.85 7.07706 6.9 6.926402
6 4.365 5.09313 6.715 5.159399 7.04 4.886551
7 7.15 6.930695 6.95 7.127184 6.95 6.90239
8 6.9 6.943442 6.25 6.757937 6.4 6.390641
9 7.05 6.980695 7 7.089762 7.05 7.13565
10 6.9 6.951611 7.65 7.610443 7.933 7.946445

The comparison between the two data are further explained through the graphs at Figure
11 where the pH for each is plotted against the time. The simulated data were fitted to the actual
data thus, giving a value of R2 greater than 0.9 at each node. This convinces that the simulated
data for pH with the use of the developed model is acceptable.

2
=

(a) I1 (b) I2

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 18 of 77
2
=

(c) I3

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

The figures below are the contoured maps for the river’s initial and final pH. 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

3.4. 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. Table 5 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
RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 19 of 77
F.3) .Therefore, the application of these models is for calculating water quality parameters such
as dissolved oxygen, temperature and pH.
Table 5: P-Value of Actual Vs. Theoretical.

P- VALUE
Day DO Temperature pH
1 0.094416 0.385828 0.090023
2 0.154069 0.49749 0.365715
3 0.202691 0.053374 0.436546
4 0.211568 0.132078 0.315326
5 0.131526 0.220891 0.491016
6 0.269425 0.400069 0.081096
7 0.195773 0.120917 0.409407
8 0.403408 0.120917 0.177925
9 0.226458 0.387781 0.284465
10 0.159461 0.151495 0.389146

3.5. Model Accuracy


The values of the actual and theoretical water quality parameters were plotted and their
coefficient of determination was determined. The R2 of the developed model were compared
to the published model. For the water quality parameters, temperature, pH and dissolved
oxygen, the highest R-squared value was 0.99514, 0.98654 and 0.98112, respectively. The
simulated results were in good arguments with measured values. The R2 of the simulated data
were compared to the published models as shown in Table 6. Temperature model was
developed for Wear, Nene, and Tamar River of Northampton and it is found out that the model
has a coefficient of determination of 0.962, 0.976, and 0.98, respectively (Smith, 2009). Also,
dissolved oxygen model was also applied to Surma River of Banladesh and Tigris River of
Syria with the model having a coefficient of determination of 0.963 and 0.921, respectively
(Ahmed, 2014) . The coefficient of determination for pH model that is applied to Ahoada River
of Nigeria is 0.839 (Ukpaka & Douglas, 2016). Results show that model developed model is
in good fit to the actual data compared to the published models.
Table 6: Comparison of the R2 of the Simulated and Published Models.

Formulated Model (R2) Published Model (R2)


Wear River Nene River Tamar
Temperature Model I1 0.94974
I2 0.99514 0.962 0.976 0.98
I3 0.97082

Formulated Model (R2) Published Model (R2)


Surma River Tigris River
Dissolved Oxygen I1 0.89811
Model I2 0.98112 0.963 0.921
I3 0.89112

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 20 of 77
Formulated Model (R2) Published Model (R2)
Ahoada River
I1 0.91673
pH Model
I2 0.92082 0.839
I3 0.98654

3.6. Prediction of Water Quality Parameters

3.6.1. Case 1: An additional pollutant source is present in the river

For this case, an additional discharge was placed between the points B6 and B7. The
discharge assumed has the same characteristic as the discharge from B4. The effect on the
temperature, pH and dissolved oxygen of this discharge on the river was evaluated with the use
of the model developed; hence, the following graph shows the comparison between the
predicted and the actual result. The predicted temperature for the two inner nodes (I2 and I3)
follow the same trend as the actual temperature measured. These two graph fluctuates at first
having a decrease, increase, decrease trend then followed by continuous increase until the end
time of simulation. However, the I1 predicted temperature contradicted the trend at first with
the minimum value reaching 23.60445˚C at the time 1.2096 × 105 comparing with the actual
with a temperature lowest at time 4.8384 × 10 5 with a temperature of 22.5˚C (see Appendix
D.2). Not until the latter time, the two plot (predicted and actual of I1) follows the same
temperature trend line.

(a) I1 (b)I2

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 21 of 77
(c) I3
Figure 13: Prediction of Temperature for Case 1.

The three graphs shown below (Figure 14) are the predicted and the actual plots of DO
at the inner nodes. All of the three graph of predicted DO fit the actual graph of DO. The
predicted at I1 started with an almost constant value from 6.603236 to 6.58578 mg/mL while
I2 started with a decreasing trend, from an initial DO of 7.489097 to 3.501366. The same with
I2, I3 decreases with an initial value of 7.35746 to 5.26473 mg/mL.

(a) I1 (b) I2

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 22 of 77
(c) I3
Figure 14: Prediction of DO for Case 1.
The predicted pH graph (Figure 15) for the three inner nodes as shown alters differently
at each time with the actual temperature. For the predicted pH parameter at I1, the trend
decreases continuously from 6.901611 to 5.09313 at time 2.4192 × 10 5 to 7.2576 ×105 seconds.
Compared with the actual, between these times is an increase value of 6.9 before decreasing.
Following the decrease trend is a sudden increase with values 6.943442 and 7.15 for the
predicted and actual pH respectively. The predicted line then flattens.
The predicted pH at I2 follows the actual pH trend having an alternating increase and
decrease pattern. Originally, both lines fitted with each other. The pH attained the lowest value
of 5.159399 and 5.5 at time 7.2576 × 105 and 4.8384 × 10 5 seconds for predicted and actual
respectively.
Additionally, for I3 graph, the predicted fits the actual graph except at a certain point
of time in which the predicted drops to 4.886551 while the actual increases

(a) I1 (b) I2

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 23 of 77
(c) I3
Figure 15: Prediction of pH for Case 1.

3.6.1.1. Contour Mapping of Case 1

For this case, additional source at the boundary was considered. The condition of the
additional source added is the same as the source at B4. Based from the simulated data (see
Appendix F.2), there is a minute change in temperature for the current and predicted
temperature condition. This is evidently shown in contoured maps below where the color of
the maps are relatively close with each other.

Current Predicted
Figure 16: Actual Vs. Predicted Temperature Contour Map.

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 24 of 77
The contoured map shows that there is an infinitesimal change in Dissolved oxygen of
the current and predicted condition of the river as shown in Figure 17. The simulated data for
this case is shown in Appendix F.2 wherein it was observed that the predicted dissolved oxygen
is close with the simulated data for the current status of the river.

Current Predicted
Figure 17: Actual Vs. Predicted Dissolved Oxygen Contour Map.

For the water quality parameter pH, it can also be observed that the current and
predicted pH of the river is relatively close to each other. The same results were observed in
the temperature and dissolved oxygen of the river.

Current Predicted
Figure 18: Actual Vs. Predicted pH Contour Map.

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 25 of 77
3.6.2. Case 2: The classification effluent discharge of Source 1 is at Class B
The effect of Class B effluent discharge into the river was evaluated using the
developed model. Point B4 was changed from its current status which is Class C into Class B.
The selected temperature of the Class B effluent was based on DENR-Administrative Order
No. 2016-08(See Appendix G). Figures 19 shows the changes in temperature of the river when
a Class B effluent was discharged. It is observed that the changed in temperature of the river is
small for I1 and I3 while the predicted I2 temperature ranges from 25.31416 - 27.2513 °C
compared to the actual temperature change range of 23.5 – 30.6 °C (See Appendix F.2).

(a) I1 (b) I2

(c)I3
Figure 19: Temperature Prediction for Case 2.

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 26 of 77
The predicted and actual DO values of I1, I2 and I3 were shown in Figures 20. As can
be seen, I1 and I3 have the smallest change between its predicted and actual values unlike I2
with predicted values that ranges to 6.73-7.61and actual values of 5.8-7.65. Based from the
results, even if Class B effluent was discharged to the river, the condition of the river will
remain at Class C.

(a) I1 (b) I2

(c) I3
Figure 20: Prediction of DO for Case 2.

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 27 of 77
The selected value of pH for Class B effluent was also based from DENR-
Administrative Order No. 2016-08(See Appendix G). As compared to the change of pH from
actual to predicted values of each internal nodes (I1, I2 and I3), I2 have the biggest change of
pH with predicted values that ranges from 6.297044 – 6.609495 and actual values that ranges
from 6.8 – 7.65 (See Appendix F.2).

(a) I1 (b) I2

(c) I3
Figure 21: Prediction of pH for Case 2.

3.6.2.1 Contour Mapping of Case 2

The figure below shows the comparison between the contoured map of the current
temperature condition of the river from the gathered data and the predicted temperature where
in one of the discharge is changed to Class B. The standard temperature of Class B is 26 °C as
set by the DENR Administrative Order 2016-08-WQG (Water Quality Guidelines) and General
Effluent Standards (GES) (see Appendix G) instead of the current discharge coming from one
of the sources. The colorbar in the figures denotes the temperature condition of the water, from
darkest color (coldest) to lightest color (hottest). The contour map of the predicted temperature
condition of the river displays multiple color gradient as compared to the contour map of the
current temperature condition. The multiple gradient denotes multiple temperature in the
boundary because of the Class B discharge. Based from the colorbars, the current temperature
condition of the river is hotter compared to the predicted temperature condition. Therefore,
changing the one class of the sources to B could contribute to colder temperature in the river.

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 28 of 77
Current Predicted
Figure 22: Actual Vs. Predicted Temperature Contour Map

The dissolved oxygen for Class B is 5 mg/L as set by the DENR Administrative Order
2016-08-WQG (Water Quality Guidelines) and General Effluent Standards (GES) (see
Appendix G). Applying the same case for dissolved oxygen, it can be observed from the figures
below that the level of dissolved oxygen decreases as the current discharge was changed to
Class B. The prediction shows that due to the continuous Class B discharge in the river the
dissolved oxygen also decreases continuously.

Current Predicted

Figure 23: Actual Vs. Predicted Dissolved Oxygen Contour Map.

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 29 of 77
The same case was used for pH wherein one of the discharge was changed to Class B and
the standard pH was set to 6. The predicted pH shows multiple colour gradient which implies
multiple pH level in the boundary as compared to the current pH condition of the river. Based
from the colorbars, the pH from the current condition is more neutral as compared to the
predicted pH of the river. Therefore, the Class B discharge makes some part of the river acidic.

Current Predicted
Figure 24: Actual vs. Predicted pH Contour Map.

3.6.3. Case 3: The classification of effluent discharge of Source 1 is at Class D

The following figures shows the different water quality parameters temperature, pH,
and DO for the Pinacanauan Rivers at its interior nodes I1, I2, and I3. The effect of Class D
effluent discharge into the river was evaluated using the developed model. Point B4 was
changed from its current status which is Class C into Class D. The selected temperature of the
Class D effluent was based on DENR-Administrative Order No. 2016-08(See Appendix G).
The continuous lines in the figures represent the graph of the river’s current condition with two
discharges at B2 and B4 of class C. The broken lines on the other hand are the projected water
qualities of the river at its interior nodes if there will be only one sink (B4) and a discharge of
class D.
The set of figures below (Figure 25) show the current and projected water temperature
for the interior nodes. The projected graphs have the same trend as the current graph. This is
especially true to I1 and I3 beginning with a slight increase, followed by a decrease, to another
increase then to a sudden increase before flattening out towards the end. Both graphs have a
lesser maximum and minimum temperature than the current graph. Their temperature ranges
also lessened; I1 originally has a temperature range of 23.5-30.5⁰C while the projected values
ranges 23.74987-30.228954⁰C; and I3 has a current data temperature range of 23-31.3⁰C while
the projected data has 28.82607-30.91033⁰C. At I2 on the other hand, although it has a similar
trend, the projected graph has a wide gap in values with the actual graph. It has a much greater
minimum temperature than the current graph and a slightly greater maximum temperature,
lessening the temperature range from 22.5-30.6⁰C to 23.34844-30.88578⁰C. The overall effect
of having one discharge with a class D to the water instead of two of class C is having a lesser
temperature range.
RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 30 of 77
(a)I1 (b)I2

(c)I3
Figure 25: Prediction of Temperature for Case 3.

The water parameter DO for case 3 at the interior nodes are shown below. This water
parameter has a good fit for I1 and I3. The DO for the actual river condition has a range of
2.485-9.03mg/L for I1 while the projected values has a range 4.562447-6.980695mg/L. For I3,
the actual river’s DO ranges from 4.75-7.685mg/L while the projected value has 4.851-
7.648077mg/L range. Unlike the two nodes, I2 has a bad fit. It showed a significant drop in its
DO failing to achieve even a third of the current river’s DO. Although the broken line has the
same trend as the continuous line, its peaks and sinks are not as dramatic as the continuous line.
No point had the two lines managed to intersect. The range for I3’s actual DO is from 5.22-
8.27 mg/L while the projected DO for the river ranged 3.421788-4.374152mg/L. Nonetheless,
having one discharge with a class D to the water instead of two of class C is having a smaller
range of DO values.

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 31 of 77
(a)I1 (b)I2

(c)I3
Figure 26: Prediction of DO for Case 3.
For the projected pH of the river for Case 3 is shown in Figure 27. The same as with
temperature, the trend of the pH graphs of the projected water qualities is follows the trends of
the current water qualities. The best fit among the three is in I1 followed by I3 and the least is
I2. Because the graphs of the current river pH have very high and low peaks, the one with the
least pH range is I2, followed by I3, then I1. In I1, the current river pH range was 4.365-7.15
while the projected pH range was only 5.09313-6.980695. In R2, the current data has 5.5-7.65
pH range while the predicted pH range was from 5.638497-6.242771. Lastly, the current pH
range in I3 was 5.7-7.933 while the projected pH values has a range of 6.041629-7.842703. All
three graphs showed that having one discharge with a class D to the water instead of two of
class C causes a closer pH range.

(a)I1 (b)I2

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 32 of 77
(c)I3
Figure 27: Prediction of DO for Case 3.

3.6.3.1. Contour Mapping of Case 3

The contoured maps for the predicted and the current temperature of the river is shown
in Figure 28. In this case, the discharge coming from one of the sources was changed to Class
D where the temperature was set to 31˚C. The figure shows that both current and predicted
values displays higher temperature at the left side of the boundary as indicated by the color in
the colorbar. It can also be observed from the maps that there was a little change between the
current and predicted temperature.

Current Predicted
Figure 28: Actual Vs. Predicted Temperature Contour Map.
Applying the same case for dissolved oxygen, the maps show the change in the level of
dissolved oxygen when current discharge was changed to Class D. The dissolved oxygen for
Class D effluent is 3 mg/L as set by the DENR Administrative Order 2016-08-WQG (Water
Quality Guidelines) and General Effluent Standards (GES). The map shows that discharge of
Class D effluent decreases the amount of dissolved oxygen in the river.

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 33 of 77
Current Predicted
Figure 29: Actual vs. Prediction DO Contour Map.
The comparison between the current and predicted pH of the river is shown in the
Figure 30. The same case was used wherein one of the discharge was changed to Class D and
the pH was set to 5.5 instead of the original effluent coming from one of the sources. Based
from the colorbar, the figure shows higher pH on the current values as compared to the
predicted values. It can also be observed from the figure that blue color appeared on the
predicted pH which indicates that the river becomes more acidic as Class D effluent of 5.5 pH
is discharge in the river.

`
Current Predicted
Figure 30: Actual vs. Predicted pH Contour Map.

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 34 of 77
4. SUMMARY, CONCLUSIONS, AND RECOMMENDATIONS
4.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™.
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, were
the following: 0.94974, 0.89811, and 0.91673 (I1); 0.99514, 0.98112, and 0.92082 (I2) and
0.97082, 0.89112, 0.98654 (I3), respectively.
Simulated temperature, dissolved oxygen and pH values were 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.
Also, the model was used to predict the condition of the river considering the three
cases. In Case 1, an additional pollutant source was considered, the result shows a minute
change between the current and predicted condition of every parameter. For Case 2 in which
the classification of discharge was changed to Class B, the results show that even if Class B
was discharged to the river, the condition of the river will still remain at Class C. And for Case
3, where Class D was considered as a discharge at source 1, a closer range of temperature, DO,
and pH values was found out.
4.2. Recommendations
For the development of a better river quality model, the following are recommended:
1. The testing of water parameters should be extended from 4 months to one year to
account for the wet and dry seasons of the country as well as the yearly calamities
(typhoons, drought, etc.) that hit the country;
2. The time interval between sampling should be lessened from every fourteen days to
every ten days or less to have a better and more accurate results;
3. The area of the system understudy should be increased to have a better sample system.
4. Instead of a 2D model, a 3D model should be developed in order to account for the
river’s depth.;
5. The water parameters accounted for developing a water quality model must be
increased and not only consider its temperature, DO and pH but on other parameters as
well (fecal coliform, turbidity, color, odor, etc); and
6. For a faster simulation and projection of water quality parameter data, computers with
greater specifications, larger storage disks and faster running speed should be
employed.

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 35 of 77
REFERENCES
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 .
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.

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 36 of 77
Easa, A., & Abou-Rayan, A. (2010). Domestic Wastewater Effect on the Pollution of the
Groundwater in Rural Areas in Egypt. Fourteenth International Water Technology
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.
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.

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 37 of 77
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.
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
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.

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 38 of 77
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.
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.
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.
RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 39 of 77
APPENDICES
Appendix A – Approval Sheet, Request Letters, etc.

APPROVAL SHEET

This thesis entitled “Mathematical Modelling of Water Quality in Pinacanauan River”,

prepared and submitted by Razel V. Alumit, Van Vesper J. Dulliyao, Denver V. Guillermo, Rhea

D. Mamba, Laica C. Manaligod, Elha E. Maruquin, in partial fulfilment for the degree of

Bachelor of Science in Chemical Engineering is hereby recommended for oral examination.

Engr. Leonard D. Agana


Adviser

Approved by the Thesis Committee with a grade of _________________.

Engr. Monico U. Tenedor Engr. Caesar P. Llapitan Engr. Angelica R. Corpuz


Chairman Member Member

Engr. Ma. Haidee Mabborang Engr. Theresa Lean B. Tuliao


Member Member

Accepted in partial fulfilment of the requirement for the degree Bachelor of Science in

Chemical Engineering.

Engr. Audy R. Quebral


Dean, College of Engineering

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 40 of 77
RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 41 of 77
Appendix B – Documentations, Design, Flow Charts, Certificates, etc.

Figure 31: First discharge for the chosen boundary. A continuous flowing water coming from the residential
houses.

Figure 32: 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 33: A photo of the group measuring the width of the river (left side) and the its length on the land area
(right side).
RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 42 of 77
Figure 34: 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 35: Sample collection from the chosen sampling points. The sampling bottles was
cupped under water to prevent air bubbles.

Figure 36: Analysing the samples using chemical test for the parameters pH and DO. Photo
taken at Bureau of Fisheries and Aquatic Resources (BFAR) laboratory.

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 43 of 77
Figure 37: On-site water analysis using the equipment devices (Thermometer, pH meter, and
DO meter).

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

Figure 39: Measuring of water depth at different points.


RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 44 of 77
Figure 40: Setting up for the Measuring of velocity using a table tennis ball and timer.

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

Figure 42: Photo taken during the last data collection with the boat owner Lyafayeth Tasi.

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 45 of 77
Appendix C – Water Quality Parameters, River Geometry, and Meteorological Data

C.1 Actual Data

First Sampling
Dissolve Oxygen
pH Temperature(˚C)
(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.85 23.5 7.685
13 6.8 23.5 7.685

Second Sampling
Dissolve Oxygen
pH Temperature
(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.2 22.5 3.95
13 7.2 23.0 6.1

Third Sampling
Dissolve Oxygen
pH Temperature
(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.0 24.5 9.03
12 5.8 24.5 8.27
13 6.05 25.0 8.16

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 46 of 77
Fourth Sampling
Dissolve Oxygen
pH Temperature(˚C)
(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.7 22.5 8.24
12 6.2 22.75 8.19
13 5.7 23.0 7.56

Fifth Sampling
Dissolve Oxygen
pH Temperature(˚C)
(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 5.8 26.25 8.23
12 6.85 25.95 7.525
13 6.9 26.05 7.335

Sixth Sampling
Dissolve Oxygen
pH Temperature(˚C)
(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 5.1 26.0 6.95
12 5.25 26.5 7.05
13 5.0 26.5 6.3

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 47 of 77
Seventh Sampling
Dissolve Oxygen
pH Temperature(˚C)
(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.5 5.36
12 6.95 26.75 5.22
13 6.95 27.0 5.05

Eight Sampling
Dissolve Oxygen
pH Temperature(˚C)
(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 4.25
12 6.5 29.0 4.1
13 6.4 29.5 4.75

Ninth Sampling
Dissolve Oxygen
pH Temperature(˚C)
(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

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 48 of 77
Tenth Sampling
Dissolve Oxygen
pH Temperature(˚C)
(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
C.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
C.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
C.4 Slope of the River

Elevation Difference
Slope river 
Length of River

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 49 of 77
Length of river 200 m.
Minimum Elevation 18 m.
Maximum Elevation 27 m.
Elevation Difference 9 m.
Slope of river 0.045

C. 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/

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 50 of 77
Appendix D - Model Discretization and Calculation of Sources/Sinks

D.1 Discretization of Formulated Model

D.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 C  C   k L 
x y
a sat i , j ,t d
 

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

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  T  2Ti , j ,t  Ti , j 1,t 


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

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 51 of 77
  Ti 1, j ,t  2Ti , j ,t  Ti 1, j ,t  T  2Ti , j ,t  Ti , j 1,t 
 Dx    D y  i , j 1,t 
  x 2
  y 2 
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 

D.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 2  D y 2  k p
t x y x y
and it was discretized, the equation becomes
C i , j ,t 1  C i , j ,t u C i , 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  C i 1, j ,t 
  
t x y x 2
D y C i , 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

 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 

D.2 Calculation of the Sources/Sinks

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


RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 52 of 77
k a  0.72599 x1.02426.434520
1
k a  0.84568
day
D.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 1  0.17 SK  TA  273.166
13

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


6
H AN
 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
RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 53 of 77
 
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 
HC  H E  
T -T
6.19  10 -4 p S A
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
D.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

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 54 of 77
 2902.39 
 6.4980.02379299.6007 299.6007 
k2  10  

mg
k 2  4.819166316 x10 11
L

D.3 Diffusion Coefficient

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

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 55 of 77
Appendix E - Matlab™ Codes

E.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;

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 56 of 77
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;
RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 57 of 77
pH(200,y,t) = 5.4;

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;
RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 58 of 77
elseif t_inst == 98*3600*24

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
RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 59 of 77
%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));

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
RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 60 of 77
E.2 Matlab™ 2013a Codes for Calculation of R2

function [r2 rmse] = rsquare(y,f,varargin)


% Compute coefficient of determination of data fit model and RMSE
%
% [r2 rmse] = rsquare(y,f)
% [r2 rmse] = rsquare(y,f,c)
%
% RSQUARE computes the coefficient of determination (R-square) value from
% actual data Y and model data F. The code uses a general version of
% R-square, based on comparing the variability of the estimation errors
% with the variability of the original values. RSQUARE also outputs the
% root mean squared error (RMSE) for the user's convenience.
%
% Note: RSQUARE ignores comparisons involving NaN values.
%
% INPUTS
% Y : Actual data
% F : Model fit
%
% OPTION
% C : Constant term in model
% R-square may be a questionable measure of fit when no
% constant term is included in the model.
% [DEFAULT] TRUE : Use traditional R-square computation
% FALSE : Uses alternate R-square computation for model
% without constant term [R2 = 1 - NORM(Y-F)/NORM(Y)]
%
% OUTPUT
% R2 : Coefficient of determination
% RMSE : Root mean squared error
%
% EXAMPLE
% x = 0:0.1:10;
% y = 2.*x + 1 + randn(size(x));
% p = polyfit(x,y,1);
% f = polyval(p,x);
% [r2 rmse] = rsquare(y,f);
% figure; plot(x,y,'b-');
% hold on; plot(x,f,'r-');
% title(strcat(['R2 = ' num2str(r2) '; RMSE = ' num2str(rmse)]))
%
% Jered R Wells
% 11/17/11
% jered [dot] wells [at] duke [dot] edu
%
% v1.2 (02/14/2012)
%
% Thanks to John D'Errico for useful comments and insight which has helped
% to improve this code. His code POLYFITN was consulted in the inclusion of
% the C-option (REF. File ID: #34765).

if isempty(varargin); c = true;
elseif length(varargin)>1; error 'Too many input arguments';
elseif ~islogical(varargin{1}); error 'C must be logical (TRUE||FALSE)'
else c = varargin{1};
end

% Compare inputs
RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 61 of 77
if ~all(size(y)==size(f)); error 'Y and F must be the same size'; end

% Check for NaN


tmp = ~or(isnan(y),isnan(f));
y = y(tmp);
f = f(tmp);

if c; r2 = max(0,1 - sum((y(:)-f(:)).^2)/sum((y(:)-mean(y(:))).^2));
else r2 = 1 - sum((y(:)-f(:)).^2)/sum((y(:)).^2);
if r2<0
% http://web.maths.unsw.edu.au/~adelle/Garvan/Assays/GoodnessOfFit.html
warning('Consider adding a constant term to your model')
%#ok<WNTAG>
r2 = 0;
end
end

rmse = sqrt(mean((y(:) - f(:)).^2));

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 62 of 77
Appendix F - Simulation Results and Statistical Analysis

F.1 Simulation Results

Time Temp 1 Temp 2 Temp 3


0 23.58306 23.64282 23.65483
1209600 23.60445 23.49234 23.44924
2419200 23.97994 22.87967 22.1495
3628800 23.65148 24.13597 23.54031
4838400 24.25581 22.99172 23.2918
6048000 26.20346 26.20466 26.09612
7257600 26.31361 26.99176 26.81986
8467200 27.48192 26.99172 27.25281
9676800 29.23192 29.08876 29.36588
10886400 30.22895 30.64344 30.7923
12096000 30.19987 30.55036 30.85068

Time pH 1 pH 2 pH 3
0 6.758943 6.729063 6.74268
1209600 6.843442 6.872851 6.926767
2419200 6.901611 7.263789 7.065241
3628800 6.190473 5.739827 5.858941
4838400 5.891832 6.655944 5.416848
6048000 5.556923 7.07706 6.926402
7257600 5.09313 5.159399 4.886551
8467200 6.930695 7.127184 6.90239
9676800 6.943442 6.757937 6.390641
10886400 6.980695 7.089762 7.13565
12096000 6.951611 7.610443 7.946445

Time DO 1 DO 2 DO 3
0 7.628197 7.662857 7.684965
1209600 6.603236 7.489097 7.35746
2419200 6.58578 3.501366 5.26473
3628800 8.343301 8.343418 8.053624
4838400 8.197079 8.240218 7.845481
6048000 7.656159 7.535051 7.113582
7257600 6.462873 6.534535 6.359633
8467200 4.562447 5.693666 4.625674
9676800 4.716579 3.987134 5.09569
10886400 6.925908 7.535377 7.292036
12096000 6.225017 6.251743 6.210554

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 63 of 77
Temperature

pH

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 64 of 77
F.2 Prediction Simulation Results

Case 1:

ADDITION OF SOURCE
Temperature pH DO
Time
I1 I2 I3 I1 I2 I3 I1 I2 I3
1209600 23.60445 23.49234 23.44924 6.843442 6.872851 6.926767 6.603236 7.489097 7.35746
2419200 23.97994 22.87967 22.1495 6.901611 7.263789 7.065241 6.58578 3.501366 5.26473
3628800 23.65148 24.13597 23.54031 6.190473 5.739827 5.858941 8.343301 8.343418 8.053624
4838400 24.25581 22.99172 23.2918 5.891832 6.655944 5.416848 8.197079 8.240218 7.845481
6048000 26.20346 26.20466 26.09612 5.556923 7.07706 6.926402 7.656159 7.535051 7.113582
7257600 26.31361 26.99176 26.81986 5.09313 5.159399 4.886551 6.462873 6.534535 6.359633
8467200 27.48192 26.99172 27.25281 6.930695 7.127184 6.90239 4.562447 5.693666 4.625674
9676800 29.23192 29.08876 29.36588 6.943442 6.757937 6.390641 4.716579 3.987134 5.09569
10886400 30.22895 30.64344 30.7923 6.980695 7.089762 7.13565 6.925908 7.535377 7.292036
12096000 30.19987 30.55036 30.85068 6.951611 7.610443 7.946445 6.225017 6.251743 6.210554

Case 2:
CLASS B DISCHARGE
Temperature pH DO
Time
I1 I2 I3 I1 I2 I3 I1 I2 I3
1209600 23.60445 25.31416 23.57901 6.843442 6.297044 6.820672 6.603236 5.721819 7.308212
2419200 23.97994 25.11473 23.05725 6.901611 6.313297 6.873329 6.58578 4.949299 5.327901
3628800 23.65148 25.31615 23.618 6.190473 5.989217 5.869793 8.343301 5.783882 7.77606
4838400 24.25581 25.17996 23.45335 5.891832 5.892965 5.576945 8.197079 5.815235 7.715284
6048000 26.20346 25.98091 26.07592 5.556923 6.325176 6.891407 7.656159 5.563437 6.929823
7257600 26.31361 26.26011 26.88419 5.09313 5.369242 4.494598 6.462873 5.436336 6.461461
8467200 27.48192 26.26197 27.19872 6.930695 6.337427 6.861158 4.562447 4.666962 4.347052
9676800 29.23192 26.80286 29.18499 6.943442 6.137253 6.322305 4.716579 4.659157 4.403878
10886400 30.22895 27.27913 30.56325 6.980695 6.353556 7.08667 6.925908 5.593146 7.094357
12096000 30.19987 27.2513 30.58619 6.951611 6.609495 7.874701 6.225017 5.278659 6.163805

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 65 of 77
Case 3:

CLASS D DISCHARGE
Temperature pH DO
Time
I1 I2 I3 I1 I2 I3 I1 I2 I3
1209600 23.74987 28.82607 23.34844 6.901611 6.066603 7.156149 6.603236 4.224829 7.099587
2419200 23.979944 28.82607 23.48862 6.901611 6.066603 7.144935 6.58578 3.647975 5.614185
3628800 23.65148 29.09521 24.22119 6.190473 5.638497 5.878276 8.343301 3.75307 7.41231
4838400 24.255808 28.82359 23.7129 5.891832 5.918339 6.536721 8.197079 4.374152 7.648077
6048000 26.20346 29.66455 26.43667 5.556923 5.962453 6.869529 7.656159 4.190264 7.034318
7257600 26.313607 29.84012 26.98211 5.09313 5.626673 6.041343 6.462873 3.887475 6.121572
8467200 27.481923 29.9097 27.46846 6.930695 5.974705 6.839281 4.562447 3.745089 5.593011
9676800 29.231923 30.51831 29.62655 6.943442 5.814541 6.401629 4.716579 3.421788 4.851806
10886400 30.228954 30.85404 30.65025 6.980695 5.986832 7.054672 6.925908 4.23222 7.229378
12096000 30.19987 30.91033 30.88578 6.951611 6.242771 7.842703 6.225017 3.873584 6.187519

F.3 Statistical Analysis Using Paired t-Test in Excel

F.3.1. Temperature

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


Actual Theoretical
Mean 23.5 23.515343
Variance 0 0.0064194
Observations 3 3
Pearson Correlation #DIV/0!
Hypothesized Mean Difference 0
df 2
t Stat -0.33169
P(T<=t) one-tail 0.385828
t Critical one-tail 2.919986
P(T<=t) two-tail 0.771656
t Critical two-tail 4.302653

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 66 of 77
t-Test: Paired Two Sample for Means (Day 2)
Actual Theoretical
Mean 23 23.00304
Variance 0.25 0.849042
Observations 3 3
Pearson Correlation 0.597042
Hypothesized Mean Difference 0
df 2
t Stat -0.0071
P(T<=t) one-tail 0.49749
t Critical one-tail 2.919986
P(T<=t) two-tail 0.99498
t Critical two-tail 4.302653

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


Actual Theoretical
Mean 24.66667 23.77592
Variance 0.083333 0.1003167
Observations 3 3
Pearson Correlation -0.64423
Hypothesized Mean Difference 0
df 2
t Stat 2.809982
P(T<=t) one-tail 0.053374
t Critical one-tail 2.919986
P(T<=t) two-tail 0.106749
t Critical two-tail 4.302653

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


Actual Theoretical
Mean 22.75 23.51311
Variance 0.0625 0.436214
Observations 3 3
Pearson Correlation -0.7298
Hypothesized Mean 0
Difference
df 2
t Stat -1.53679
P(T<=t) one-tail 0.132078
t Critical one-tail 2.919986
P(T<=t) two-tail 0.264156
t Critical two-tail 4.302653

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 67 of 77
t-Test: Paired Two Sample for Means ( Day 5)
Actual Theoretical
Mean 26.08333 26.16808
Variance 0.023333 0.003884
Observations 3 3
Pearson Correlation 0.17952
Hypothesized Mean Difference 0
df 2
t Stat -0.95148
P(T<=t) one-tail 0.220891
t Critical one-tail 2.919986
P(T<=t) two-tail 0.441782
t Critical two-tail 4.302653

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


Actual Theoretical
Mean 26.66667 26.70841
Variance 0.333333 0.124288
Observations 3 3
Pearson Correlation 0.969826
Hypothesized Mean 0
Difference
df 2
t Stat -0.28847
P(T<=t) one-tail 0.400069
t Critical one-tail 2.919986
P(T<=t) two-tail 0.800139
t Critical two-tail 4.302653

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


Actual Theoretical
Mean 27 27.24215
Variance 0.25 0.060159
Observations 3 3
Pearson Correlation 0.999291
Hypothesized Mean 0
Difference
df 2
t Stat -1.64434
P(T<=t) one-tail 0.120917
t Critical one-tail 2.919986
P(T<=t) two-tail 0.241834
t Critical two-tail 4.302653

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 68 of 77
t-Test: Paired Two Sample for Means (Day 8)
Actual Theoretical
Mean 29.16667 969644.9
Variance 0.083333 2.82E+12
Observations 3 3
Pearson Correlation -0.5
Hypothesized Mean 0
Difference
df 2
t Stat -1
P(T<=t) one-tail 0.211325
t Critical one-tail 2.919986
P(T<=t) two-tail 0.42265
t Critical two-tail 4.302653

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


Actual Theoretical
Mean 30.5 30.5549
Variance 0 0.085221
Observations 3 3
Pearson Correlation #DIV/0!
Hypothesized Mean Difference 0
df 2
t Stat -0.32571
P(T<=t) one-tail 0.387781
t Critical one-tail 2.919986
P(T<=t) two-tail 0.775562
t Critical two-tail 4.302653

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


Actual Theoretical
Mean 30.71667 30.53364
Variance 0.285833 0.106098
Observations 3 3
Pearson Correlation 0.972607
Hypothesized Mean 0
Difference
df 2
t Stat 1.374666
P(T<=t) one-tail 0.151495
t Critical one-tail 2.919986
P(T<=t) two-tail 0.30299
t Critical two-tail 4.302653

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 69 of 77
F.3.2 Dissolved Oxygen

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


Actual Theoretical
Mean 7.678333 7.149931
Variance 0.000133 0.228489
Observations 3 3
Pearson Correlation 0.990475
Hypothesized Mean 0
Difference
df 2
t Stat 1.961589
P(T<=t) one-tail 0.094416
t Critical one-tail 2.919986
P(T<=t) two-tail 0.188832
t Critical two-tail 4.302653

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


Actual Theoretical
Mean 6.155 5.117292
Variance 0.054025 2.394706
Observations 3 3
Pearson Correlation 0.958531
Hypothesized Mean 0
Difference
df 2
t Stat 1.355125
P(T<=t) one-tail 0.154069
t Critical one-tail 2.919986
P(T<=t) two-tail 0.308138
t Critical two-tail 4.302653

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


Actual Theoretical
Mean 8.486667 8.246781
Variance 0.224433 0.027982
Observations 3 3
Pearson Correlation 0.596881
Hypothesized Mean 0
Difference
df 2
t Stat 1.045908
P(T<=t) one-tail 0.202691
t Critical one-tail 2.919986
P(T<=t) two-tail 0.405381
t Critical two-tail 4.302653
RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of
Water Quality in Pinacanauan River. Page 70 of 77
t-Test: Paired Two Sample for Means (Day 4)
Actual Theoretical
Mean 7.996667 8.094259
Variance 0.143633 0.046883
Observations 3 3
Pearson Correlation 0.986288
Hypothesized Mean 0
Difference
df 2
t Stat -0.99874
P(T<=t) one-tail 0.211568
t Critical one-tail 2.919986
P(T<=t) two-tail 0.423136
t Critical two-tail 4.302653

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


Actual Theoretical
Mean 7.696667 7.434931
Variance 0.222358 0.081116
Observations 3 3
Pearson Correlation 0.807971
Hypothesized Mean 0
Difference
df 2
t Stat 1.541834
P(T<=t) one-tail 0.131526
t Critical one-tail 2.919986
P(T<=t) two-tail 0.263052
t Critical two-tail 4.302653

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


Actual Theoretical
Mean 6.583333 6.452347
Variance 0.110833 0.007731
Observations 3 3
Pearson Correlation 0.397646
Hypothesized Mean 0
Difference
df 2
t Stat 0.73498
P(T<=t) one-tail 0.269425
t Critical one-tail 2.919986
P(T<=t) two-tail 0.538851
t Critical two-tail 4.302653

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 71 of 77
t-Test: Paired Two Sample for Means (Day 7)
Actual Theoretical
Mean 5.731667 4.960596
Variance 0.590108 0.404043
Observations 3 3
Pearson Correlation -0.5355
Hypothesized Mean 0
Difference
df 2
t Stat 1.084293
P(T<=t) one-tail 0.195773
t Critical one-tail 2.919986
P(T<=t) two-tail 0.391546
t Critical two-tail 4.302653

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


Actual Theoretical
Mean 4.288333 4.599801
Variance 2.632608 0.317452
Observations 3 3
Pearson Correlation -0.43955
Hypothesized Mean 0
Difference
df 2
t Stat -0.27845
P(T<=t) one-tail 0.403408
t Critical one-tail 2.919986
P(T<=t) two-tail 0.806817
t Critical two-tail 4.302653

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


Actual Theoretical
Mean 7.43 7.251107
Variance 0.012225 0.09412
Observations 3 3
Pearson Correlation -0.08901
Hypothesized Mean 0
Difference
df 2
t Stat 0.924279
P(T<=t) one-tail 0.226458
t Critical one-tail 2.919986
P(T<=t) two-tail 0.452916
t Critical two-tail 4.302653

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 72 of 77
t-Test: Paired Two Sample for Means (Day 10)
Actual Theoretical
Mean 6.544333 6.229105
Variance 0.158406 0.000437
Observations 3 3
Pearson Correlation -0.80745
Hypothesized Mean 0
Difference
df 2
t Stat 1.315456
P(T<=t) one-tail 0.159461
t Critical one-tail 2.919986
P(T<=t) two-tail 0.318921
t Critical two-tail 4.302653

F.3.3 pH

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


Actual Theoretical
Mean 6.816667 6.88102
Variance 0.000833 0.001786
Observations 3 3
Pearson Correlation -0.16741
Hypothesized Mean 0
Difference
df 2
t Stat -2.02574
P(T<=t) one-tail 0.090023
t Critical one-tail 2.919986
P(T<=t) two-tail 0.180046
t Critical two-tail 4.302653

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 73 of 77
t-Test: Paired Two Sample for Means (Day 2)
Actual Theoretical
Mean 7.1 7.07688
Variance 0.03 0.032895
Observations 3 3
Pearson Correlation 0.836898
Hypothesized Mean 0
Difference
df 2
t Stat 0.394301
P(T<=t) one-tail 0.365715
t Critical one-tail 2.919986
P(T<=t) two-tail 0.731431
t Critical two-tail 4.302653

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


Actual Theoretical
Mean 5.95 5.929747
Variance 0.0175 0.054531
Observations 3 3
Pearson Correlation 0.557495
Hypothesized Mean 0
Difference
df 2
t Stat 0.180939
P(T<=t) one-tail 0.436546
t Critical one-tail 2.919986
P(T<=t) two-tail 0.873091
t Critical two-tail 4.302653

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


Actual Theoretical
Mean 5.866667 5.988208
Variance 0.083333 0.390806
Observations 3 3
Pearson Correlation 0.925028
Hypothesized Mean 0
Difference
df 2
t Stat -0.56208
P(T<=t) one-tail 0.315326
t Critical one-tail 2.919986
P(T<=t) two-tail 0.630651
t Critical two-tail 4.302653

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 74 of 77
t-Test: Paired Two Sample for Means (Day 5)
Actual Theoretical
Mean 6.516667 6.520128
Variance 0.385833 0.701498
Observations 3 3
Pearson Correlation 0.99152
Hypothesized Mean 0
Difference
df 2
t Stat -0.02542
P(T<=t) one-tail 0.491016
t Critical one-tail 2.919986
P(T<=t) two-tail 0.982031
t Critical two-tail 4.302653

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


Actual Theoretical
Mean 5.116667 5.04636
Variance 0.015833 0.020252
Observations 3 3
Pearson Correlation 0.919665
Hypothesized Mean 0
Difference
df 2
t Stat 2.17017
P(T<=t) one-tail 0.081096
t Critical one-tail 2.919986
P(T<=t) two-tail 0.162192
t Critical two-tail 4.302653

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


Actual Theoretical
Mean 7.016667 6.986756
Variance 0.013333 0.01499
Observations 3 3
Pearson Correlation -0.39654
Hypothesized Mean 0
Difference
df 2
t Stat 0.260547
P(T<=t) one-tail 0.409407
t Critical one-tail 2.919986
P(T<=t) two-tail 0.818815
t Critical two-tail 4.302653

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 75 of 77
t-Test: Paired Two Sample for Means (Day 8)
Actual Theoretical
Mean 6.6 6.69734
Variance 0.07 0.079151
Observations 3 3
Pearson Correlation 0.86727
Hypothesized Mean 0
Difference
df 2
t Stat -1.19096
P(T<=t) one-tail 0.177925
t Critical one-tail 2.919986
P(T<=t) two-tail 0.35585
t Critical two-tail 4.302653

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


Actual Theoretical
Mean 7.033333 7.068702
Variance 0.000833 0.006335
Observations 3 3
Pearson Correlation -0.22914
Hypothesized Mean 0
Difference
df 2
t Stat -0.67562
P(T<=t) one-tail 0.284465
t Critical one-tail 2.919986
P(T<=t) two-tail 0.568931
t Critical two-tail 4.302653

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


Actual Theoretical
Mean 7.494333 7.502833
Variance 0.284946 0.256109
Observations 3 3
Pearson Correlation 0.997544
Hypothesized Mean 0
Difference
df 2
t Stat -0.32154
P(T<=t) one-tail 0.389146
t Critical one-tail 2.919986
P(T<=t) two-tail 0.778292
t Critical two-tail 4.302653

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of


Water Quality in Pinacanauan River. Page 76 of 77
Appendix G - DENR- Administrative Order No. 2016-08

Effluent Standards

Parameter Unit Water Body Classification


AA A B C D SA SB SC SD
Ammonia as NH3-N mg/L NDA 0.5 0.5 0.5 0.75 NDA 0.5 0.5 7.5
BOD mg/L NDA 20 30 50 120 NDA 30 100 150
Boron mg/L NDA 2 2 3 12 NDA 2 20 80
Chloride mg/L NDA 350 350 450 500 NDA n/a n/a n/a
COD mg/L NDA 60 60 100 200 NDA 60 200 300
Color TCU NDA 100 100 150 300 NDA 100 150 300
Cyanide as Free Cyanide mg/L NDA 0.14 0.14 0.2 0.4 NDA 0.04 0.2 0.4
Fluoride mg/L NDA 2 2 2 4 NDA 3 3 6
Nitrate as NO3-N mg/L NDA 14 14 14 30 NDA 20 20 30
pH(Range) mg/L NDA 6.0-9.0 6.0-9.0 6.0-9.5 5.5-9.5 NDA 6.5-9.0 6.0-9.0 5.5-9.5
Phosphate mg/L NDA 1 1 1 10 NDA 1 1 10
Selenium mg/L NDA 0.02 0.02 0.04 0.08 NDA 0.02 0.2 0.4
Sulfate mg/L NDA 500 500 550 1000 NDA 500 550 1000
Surfactants (MBAS) mg/L NDA 2 3 15 30 NDA 3 15 30
Temperature °C Change NDA 3 3 3 3 NDA 3 3 3
Total Suspended Solids mg/L NDA 70 85 100 150 NDA 70 100 150

RVAlumit, VVJDulliyao, DVGuillermo, RDMamba, LCManaligod, EEMaruquin. Mathematical Modelling of Water Quality in Pinacanauan River. Page 77 of 77