FORTRAN
1
ENGR 326 Formal Lab Report 2 This assignment is worth 40 pts (20 pts for technical merit and 20 pts for the written quality)
Your Lab 2 report is due on Canvas by Wednesday Oct 21, 2020 at 11:59 pm.
A part of a new waste discharge permit, a treatment facility is required to reduce their phosphorus effluent
concentration from its current level of 0.90 mg/L. The new phosphorus effluent limit is to be determined using
the criteria that the phosphorus input or load from the effluent results in a concentration of 0.05 mg/L or less at
a point 44.5 kilometers downstream from the point of discharge. The phosphorus limit at this downstream point
was identified as the concentration needed to protect the beneficial stream uses for recreation and drinking
water supply.
The engineer in charge of the treatment plant upgrade has determined that phosphorus in the stream is
removed by two mechanisms: algal uptake and settling of suspended particles. They have also determined that
phosphorus is the limiting nutrient for algal growth in the stream, and that the algae growth rate can be
estimated using the Michaelis-Menton saturation kinetics equations. They have identified the following
equations as appropriate for modeling the phosphorus concentration and chlorophyll-A (a measure of algae
concentration) in the stream:
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
= −𝐾𝐾𝑃𝑃1𝑑𝑑 − 𝐾𝐾𝑃𝑃2𝜇𝜇𝜇𝜇
𝑑𝑑𝜇𝜇 𝑑𝑑𝑑𝑑
= −𝐾𝐾𝐴𝐴1𝜇𝜇 + 𝜇𝜇𝜇𝜇
Where: P is the phosphorus concentration (mg/L) A is the chlorophyll-A concentration (mg/L) t is the time (days) KP1 is the first-order removal rate of phosphorus by settling (day-1) KP2 is the yield coefficient (mg phosphorus/mg chlorophyll-A) KP3 is the half saturation concentration for phosphorus (mg/L) KA1 is the algal death rate (day-1) µ is the algal growth rate (day-1), where 𝜇𝜇 = 𝜇𝜇𝑚𝑚𝑚𝑚𝑚𝑚
𝑃𝑃 𝐾𝐾𝑃𝑃3+ 𝑃𝑃
µmax is the maximum algal growth rate (day-1)
2
Write a FORTRAN program which determines the concentration of phosphorus at the downstream
regulation point as a function of the concentration in the treatment plant effluent using the Runge-Kutta-
Fehlberg method to solve the differential equations above. Use your program to determine the new maximum
concentration of phosphorus allowed in the treatment plant effluent that meets this limit. Assume that the
stream has an average velocity of 0.06 m/s; KP1 = 0.05/day; KP2 = 1.0/day; KP3 = 0.03/day; KA1 = 0.003/day;
µmax = 0.43/day and the concentration of chlorophyll-A in the stream upstream of this section is 0.002 mg/L.
Your basic result for the maximum allowable effluent concentration is a plot of the concentration of
phosphorus from the discharge point to the downstream monitoring point in increments of 0.5 kilometers.
Your program should be used to perform a sensitivity analysis on the effect of average stream velocity, the
upstream chlorophyll-A concentration, the removal rate of phosphorus by settling (KP1) and the yield coefficient
(KP2).
The first appendix of your Lab 2 report should show that you verified your code results by comparing your
Fortran code results to the Scilab results you produced for HW 4 for the the Lotka-Volterra predator-prey model.