**2. Methods**

### **2.1 Water quality models**

The flow is modeled using one-dimensional formulations of free surface flows based on the conservation of mass and momentum equations:

$$\frac{\partial A\_f}{\partial t} + \frac{\partial Q}{\partial \mathbf{x}} = q\_{lat} \tag{1}$$

$$\frac{\partial \mathbb{Q}}{\partial t} + \frac{\partial}{\partial \mathbf{x}} \left( \frac{\mathbb{Q}^2}{A\_f} \right) + gA\_f \frac{\partial \mathbb{h}}{\partial \mathbf{x}} + \frac{g\mathbb{Q}[\mathbb{Q}]}{\mathbb{C}^2 R A\_f} - \mathcal{W}\_f \frac{\tau\_{wi}}{\rho\_w} = \mathbf{0} \tag{2}$$

where,


ρw Water density in kg/m3.

In addition to these equations the flow discharges at hydraulic structures included in the model segmentation are computed using specific expressions for each type of structure: bridges, culverts, siphons, orifices, pumps, and weirs. In these structures the flow depends on the upstream and downstream levels, on its dimensions and on a set of specific parameters.

The water quality model is based on the one-dimensional transport equation:

$$\frac{\partial \left(A\_f \mathbf{C}\right)}{\partial t} = -\frac{\partial \left(\mathbf{QC}\right)}{\partial \mathbf{x}} + \frac{\partial}{\partial \mathbf{x}} \left(DA\_f \frac{\partial \mathbf{C}}{\partial \mathbf{x}}\right) + SA\_f \tag{3}$$

where,

C Substance concentration in kg/m3;

D Diffusion coefficient in m2/s;

S Source, sink and reaction term in kg/m3/s.

The last term of Eq. 3 refers to the sources and sinks and the dependence on the processes occurring in the water column related with the modeled substance. For each water quality problem a set of equations are considered, one for each substance involved in the water quality problem to simulate. The different biogeochemical processes relevant to the study of surface water quality problems have a great diversity. In this work it was chosen a processes

The flow is modeled using one-dimensional formulations of free surface flows based on the

*<sup>A</sup> <sup>Q</sup> <sup>q</sup> t x* ∂ ∂ + =

+ ⎜ ⎟ ++ −=

In addition to these equations the flow discharges at hydraulic structures included in the model segmentation are computed using specific expressions for each type of structure: bridges, culverts, siphons, orifices, pumps, and weirs. In these structures the flow depends on the upstream and downstream levels, on its dimensions and on a set of specific

> *A C QC <sup>C</sup> DA SA t xx x*

The last term of Eq. 3 refers to the sources and sinks and the dependence on the processes occurring in the water column related with the modeled substance. For each water quality problem a set of equations are considered, one for each substance involved in the water quality problem to simulate. The different biogeochemical processes relevant to the study of surface water quality problems have a great diversity. In this work it was chosen a processes

The water quality model is based on the one-dimensional transport equation:

( *<sup>f</sup>* ) ( )

*lat*

*f f f w f*

<sup>2</sup> <sup>0</sup> *wi*

*f f*

<sup>∂</sup> <sup>∂</sup> ∂ ∂ ⎛ ⎞ =− + <sup>+</sup> ⎜ ⎟ ∂ ∂∂ ∂ ⎝ ⎠ (3)

τ

ρ

∂ ∂ (1)

(2)

*f*

*QQ h gQ Q gA <sup>W</sup> t xA x C RA*

2

⎛ ⎞ ∂∂ ∂

∂∂ ∂ ⎜ ⎟ ⎝ ⎠

**2. Methods** 

where,

t Time in s; x Distance in m; Af Wetted area in m2;

parameters.

where,

h Water depth in m;

**2.1 Water quality models** 

conservation of mass and momentum equations:

Q Water flow discharge in m3/s;

qlat Lateral flow discharge in m2/s; g Gravity acceleration in m/s2;

C Chezy coefficient in m1/2/s; R Hydraulic radius in m; Wf Flow width in m;

τwi Wind shear stress in N/m2; ρw Water density in kg/m3.

C Substance concentration in kg/m3; D Diffusion coefficient in m2/s;

S Source, sink and reaction term in kg/m3/s.

framework, as much inclusive as possible that cover simple water quality processes, such as the modeling of accidental releases of conservative pollutants, or more complex processes, such as degradation of organic matter.

For problems involving conservative substances it is only considered the transport of the substance in the water through advection and diffusion. The evaluation of the extensions and durations of accidental discharge can be carried out recurring to a model in which the accidental discharge is modeled by a conservative substance. In addition to the cases of accidental discharge, these simple models also have practical interest to quantify the residence times and to analyze the effect of different hydrodynamic conditions in the water masses mixing conditions.

The majority of elements and substances in aquatic environments have reactions with other elements and/or substances, resulting in their transformation (decrease or increase in concentration). Bacterial contamination arising from discharges of domestic wastewater or diffuse sources, for example, can be modeled by taking up a 1st-order decay law. The behavior of many other substances (or species) can be approximated by considering the decay or growth of a second order, such as biochemical oxygen demand (BOD) or algae. The reaction coefficients should be established mainly through the available field data or laboratory tests. Dissolved oxygen (DO) is a common environmental element used to characterize the water quality in water systems. The analysis of the impact caused by discharges with a high concentration of organic matter may be made to quantify the effects in terms of variations in concentrations of dissolved oxygen in the water column, due to the decomposition of organic matter contained in wastewater discharges. The water quality processes library used in this work is one of the most complete for surface water quality modeling and includes all the relevant processes allowing the establishment of either complex water quality processes or simple ones depending on data availability.
