Example 2-6. BOD-DO problem and solution with
Visual Basic programming
The Excel-file BOD_DO_VB.XLS
can be downloaded here.
A simplified diagram of of relationship between biological oxygen demand
(BOD) and dissolved oxygen (DO) is shown in Fig. 2-4.

Fig. 2-4. Simplified BOD-DO oxygen diagram.
The basic assumptions of the so called Streeter-Phelps-model are as follows:
a) Degradation of the organic matter due to biological processes and the
oxygen demand
caused by the process
b) Aeration of water due to diffusion and different kind turbulent processes
(e.g. in rapids overflow dams)
Biological oxygen demand tends to decrease the oxygen concentration and aeration compensates this process. For simplicity the river is described using only one storage and furthermore, it is assumed that the BOD- and DO-concentrations can be assumed to relatively constant during the whole river reach (poor approximation in reality). In the model BOD is denoted by a state variable B(t) (mg l-1) and oxygen is denoted by O(t) (mg l-1). Moreover, there is relatively steady input of BOD-load from small streams denoted as BIN.
Streeter-Phelps-model for one section can be shown as follows:
(2-12)
where kB,REF is degradation coefficient for BOD (d-1) at reference temperature TR (usually 20 ° C), kA,REF is the aeration coefficient (d-1) at reference temperature TR, OS is the saturated oxygen concentration (mg l-1) depending on water temperature Tw (° C), BIN is external BOD-load (mg l-1 d-1), Q1 ja Q2 are temperature coefficients . According to Streeter-Phelps Q1 = 1.047 ja Q2 = 1.0159.
The following parameter values are used:

The calculated results are shown in Fig. 2-5 showing a very typical feature
of the model: initial decrease in DO-concentration due to degration of BOD
and when BOD is small enough, aeration starts to increase oxygen
concentration.

Fig. 2-5. Calculated values of biological oxygen demand and dissolved
oxygen concentration using the Streeter-Phelps-model.