import Pkg
Pkg.activate(@__DIR__)
Pkg.instantiate()
BEE 4750 Homework 2: Dissolved Oxygen
If you are enrolled in the course, make sure that you use the GitHub Classroom link provided in Ed Discussion, or you may not be able to get help if you run into problems.
Otherwise, you can find the Github repository here.
Overview
Instructions
This assignment asks you to use a simulation model for dissolved oxygen to assess the impacts of two wastewater streams, including minimum treatment levels and the impact of uncertain environmental conditions. You will also be asked to identify a minimum distance for the addition of a third discharge stream.
Load Environment
The following code loads the environment and makes sure all needed packages are installed. This should be at the start of most Julia scripts.
using Plots
using LaTeXStrings
using Distributions
Problems (Total: 40 Points)
A river which flows at 6 km/d is receiving waste discharges from two sources which are 15 km apart, as shown in Figure 1. The oxygen reaeration rate is 0.55 day-1, and the decay rates of CBOD and NBOD are are 0.55 and 0.25 day-1, respectively. The river’s saturated dissolved oxygen concentration is 10m g/L.

Problem 1 (8 points)
If the characteristics of the river inflow and waste discharges are given in Table 1, write a Julia model to compute the dissolved oxygen concentration from the first wastewater discharge to an arbitrary distance d
km downstream. Use your model to compute the maximum dissolved oxygen concentration up to 50km downstream and how far downriver this maximum occurs.
Parameter | River Inflow | Waste Stream 1 | Waste Stream 2 |
---|---|---|---|
Inflow | 100,000 m3/d | 10,000 m3/d | 15,000 m3/d |
DO Concentration | 7.5 mg/L | 5 mg/L | 5 mg/L |
CBOD | 5 mg/L | 50 mg/L | 45 mg/L |
NBOD | 5 mg/L | 35 mg/L | 35 mg/L |
Problem 2 (4 points)
Use your model to plot the dissolved oxygen concentration in the river from the first waste stream to 50km downstream. What do you notice?
Problem 3 (3 points)
Under the assumptions of Problem 1, determine the distance from waste stream 2 it will take for the dissolved oxygen concentration of the river to recover to 6 mg/L.
Problem 4 (5 points)
What is the minimum level of treatment (% removal of organic waste) for waste stream 2 that will ensure that the dissolved oxygen concentration never drops below 4 mg/L, assuming that waste stream 1 remains untreated?
Problem 5 (5 points)
If both waste streams are treated equally, what is the minimum level of treatment (% removal of organic waste) for the two sources required to ensure that the dissolved oxygen concentration never drops below 4 mg/L?
Problem 6 (5 points)
Suppose you are responsible for designing a waste treatment plan for discharges into the river, with a regulatory mandate to keep the dissolved oxygen concentration above 4 mg/L. Discuss whether you’d opt to treat waste stream 2 alone or both waste streams equally. What other information might you need to make a conclusion, if any?
Problem 7 (5 points)
Suppose that it is known that the DO concentrations at the river inflow can vary uniformly between 6 mg/L and 8 mg/L. How often will the treatment plan identified in Problem 5 (both waste streams treated equally) fail to comply with the regulatory standard?
Problem 8 (5 points)
A factory is planning a third wastewater discharge into the river downstream of the second plant. This discharge would consist of 5 m3/day of wastewater with a dissolved oxygen content of 4.5 mg/L and CBOD and NBOD levels of 50 and 45 mg/L, respectively.
Assume that the treatment plan you identified in Problem 5 is still in place for the existing discharges. If the third discharge will not be treated, under the original inflow conditions (7.5 mg/L DO), how far downstream from the second discharge does this third discharge need to be placed to keep the river concentration from dropping below 4 mg/L?
References
List any external references consulted, including classmates.