What you will build
A 4 km river reach with a bed of soft mud. At low flow the reach collects fine sediment; in a flood it scours its bed; and in the last stage the flood releases a PCB that was stored in the mud, part of which desorbs into the water. The reach is one completely mixed Reactor; the bed lives in the same block as an immobile constituent, and deposition, erosion and sorption are reactions. Every stage is checked against the formulas of Module 9.
| Stage | What changes | What to look for | Saved as |
|---|---|---|---|
| 1 | low flow (\(\tau_b = 0.0433\) Pa): deposition | outflow SS 50.13 g/m³; bed gains 42.6 g/(m²·day) | M9_stage1_deposition.ohq |
| 2 | flood (\(\tau_b = 2.5431\) Pa): erosion | outflow SS 342.9 g/m³; bed loses 9.26 kg/(m²·day) | M9_stage2_flood_erosion.ohq |
| 3 | + a PCB on the bed (2 µg/g), kinetic sorption | total 285.7 ng/L leaving, only 10.1 % dissolved | M9_stage3_contaminant.ohq |
The system
| Item | Low flow (Stage 1) | Flood (Stages 2–3) |
|---|---|---|
| Reach | 4000 m long, 40 m wide (bed area \(A = 160{,}000\) m²), Manning \(n = 0.030\), completely mixed | |
| Flow, depth | 8 m³/s (691,200 m³/day), 2.5 m | 120 m³/s (10,368,000 m³/day), 4.5 m |
| Water volume, residence time | 400,000 m³, 0.579 day | 720,000 m³, 0.0694 day (1.7 h) |
| Bed shear stress (Module 9, Example 2b) | 0.0433 Pa | 2.5431 Pa |
| Inflow SS | 60 g/m³ | 200 g/m³ |
| Fine sediment and mud | \(w_s = 1.5\) m/day, \(\tau_{cd} = 0.10\) Pa, \(\tau_{ce} = 0.40\) Pa, \(M = 1728\) g/(m²·day); erodible mud 45 kg/m² at the start | |
| Contaminant (Stage 3) | 2 µg/g on the bed, \(K_d = 5000\) L/kg, sorption rate \(k_s = 2\) day⁻¹ (Module 6); clean inflow | |
How the bed is represented. An Immobile constituent belongs to a block but is never carried by links. Here "Bed" is the mud on the river bed, expressed per cubic metre of the water above it (g/m³), so the areal bed mass is \(m_b = \text{Bed} \times H\): 45,000 g/m² ÷ 2.5 m = 18,000 g/m³ at low flow. OpenHydroQual writes every reaction rate per unit water volume, so the Module 9 fluxes \(D\) and \(E\) (g/(m²·day)) are divided by the depth \(H\).
Build: 1 Plugin 2 Constituents 3 Parameters 4 Reactions 5 Reach and outlet 6 Settings
Stages: 1 Low flow 2 Flood 3 Contaminant Checkpoints Explore Troubleshooting What to submit
1Start a model and load the Mass Transfer plugin
As in the M1 guide, Step 1: File → Preferences → Add plugin → Mass Transfer. It provides the Reactor block, the Fixed flow link and the Immobile constituent.


2Two constituents: suspended sediment and the bed
Create a Chemical constituent named SS (as in M1, Step 2): the suspended sediment, which flows with the water. Then create the bed with Add Objects → Chemistry → Immobile constituent (per volume of water) and name it Bed.
Why not a Solid Particle with a settling interface, as in Module 8? Because the bed must also give mass back to the water when it erodes, and because \(P_d\) and \(E\) depend on the shear stress. Writing deposition and erosion as reactions between SS and Bed keeps both directions in one place and conserves mass exactly: what leaves SS enters Bed.
3Reaction parameters: the physics in numbers
Create seven Reaction Parameters (Add Objects → Chemistry → Reaction Parameter), one for each quantity in the Krone and Partheniades expressions. Set the name and the Value; leave the temperature correction (Arrhenius factor) at 1.
| Name | Value (Stage 1) | Meaning (Module 9, Section 5) |
|---|---|---|
| w_s | 1.5 | settling velocity of the flocs, m/day |
| depth | 2.5 | water depth \(H\), m (fluxes ÷ depth = rates per volume) |
| tau_b | 0.0433 | bed shear stress, Pa: your hand calculation \(\rho g n^2 U^2/R^{1/3}\) |
| tau_cd | 0.1 | critical stress for deposition, Pa |
| tau_ce | 0.4 | critical stress for erosion, Pa |
| M_e | 1728 | erosion-rate constant \(M\), g/(m²·day) |
| K_b | 1 | small bed-availability constant, g/m³ (see Step 4) |
4Two reactions: deposition and erosion
Add a Chemical reaction (Add Objects → Chemistry → Chemical reaction). A reaction has a rate expression (g/m³/day, per unit water volume) and one stoichiometric constant per constituent, which says how much of the rate each constituent gains (+) or loses (−).
Deposition
| Property | Value | Meaning | |
|---|---|---|---|
| 1 | Bed:Stoichiometric Constant | 1 | the bed gains what deposits |
| 2 | SS:Stoichiometric Constant | −1 | the water column loses it |
| 3 | Name | Deposition | |
| 4 | Rate Expression | w_s*_pos(1-tau_b/tau_cd)*SS/depth | \(D/H = w_s\,P_d\,SS/H\); _pos(x) is \(\max(0, x)\). The GUI shows the expression in parentheses. |
Erosion
Rate expression: M_e*_pos(tau_b/tau_ce-1)*Bed/(Bed+K_b)/depth, which is \(E/H\) with \(E = M\max(0, \tau_b/\tau_{ce} - 1)\).
Why the factor Bed/(Bed + K_b)?
5The reach and the outlet
Add a Reactor named Reach:
| Property | Value | Meaning | |
|---|---|---|---|
| 1 | Bed:Concentration per volume of water | 18000 g/m³ | initial bed: 45 kg/m² ÷ 2.5 m |
| 2 | SS:Concentration | 60 g/m³ | initial SS: the reach starts with inflow water |
| 3 | SS:Constant Inflow concentration | 60 g/m³ | upstream SS |
| 4 | Initial Storage | 400000 m³ | 4000 × 40 × 2.5 |
| 5 | Constant Inflow | 691200 m³/day | 8 m³/s × 86,400 |
| 6 | Name | Reach |
Add a large Outlet Reactor (Initial Storage 1e+06 m³, as in M1, Step 4) and a Fixed flow link from Reach to Outlet with a flow of 691200 m³/day.
6Simulation time and time step


Why a smaller first step? In the flood the reach has a residence time of only 1.7 hours (0.069 day). With a first step of 0.01 day the model lags visibly behind the exact curve for the first hours (SS about 2.4 % low at 0.1 day); with 0.001 the error drops to about 0.5 %. Use 0.001 in all three stages.
Stage 1Low flow: the reach collects mud
Save as M9_stage1_deposition.ohq, and run.


Predict first (Module 9, Example 5a): \(\tau_b < \tau_{cd}\), so only deposition acts.
\[ P_d = 1 - \frac{0.0433}{0.10} = 0.567,\quad k_{dep} = \frac{1.5(0.567)}{2.5} = 0.340\ \text{day}^{-1},\quad SS = \frac{60}{1 + 0.340(0.579)} = 50.13\ \text{g/m}^3 \]The reach approaches it from 60 with the rate constant \(1/\tau + k_{dep} = 1.728 + 0.340 = 2.07\) day⁻¹.


Stage 2A flood scours the bed
Save a copy as M9_stage2_flood_erosion.ohq. Nothing in the reactions changes; only the numbers that describe the flood do. First compute the flood's bed shear stress yourself (Module 9, Example 2b): \(U = 120/(40 \times 4.5) = 0.667\) m/s, \(R = 180/49 = 3.673\) m, \(\tau_b = 1000(9.81)(0.03)^2(0.667)^2/3.673^{1/3} = 2.5431\) Pa. Then change:
| Object | Property | Low flow | Flood |
|---|---|---|---|
| tau_b | Value | 0.0433 | 2.5431 |
| depth | Value | 2.5 | 4.5 |
| Reach | Initial Storage | 400000 | 720000 m³ |
| Reach | Constant Inflow | 691200 | 10368000 m³/day |
| Reach | SS:Concentration and SS:Constant Inflow concentration | 60 | 200 g/m³ |
| Reach | Bed:Concentration per volume of water | 18000 | 10000 g/m³ (45 kg/m² ÷ 4.5 m) |
| Reach → Outlet | Flow rate | 691200 | 10368000 m³/day |
| Settings | Simulation end time | 5 | 2 days |
Predict (Module 9, Example 5b): \(\tau_b > \tau_{ce}\), so only erosion acts, at \(E = 1728(2.5431/0.40 - 1) = 9258\) g/(m²·day):
\[ SS = SS_{\text{in}} + \frac{E\,A}{Q} = 200 + \frac{9258 \times 160{,}000}{10{,}368{,}000} = 342.9\ \text{g/m}^3, \qquad \frac{d\,\text{Bed}}{dt} = -\frac{E}{H} = -2057\ \text{g/m}^3/\text{day} \]
Stage 3The flood releases a PCB stored in the bed
Save a copy of Stage 2 as M9_stage3_contaminant.ohq. The mud carries 2 µg/g of a PCB. We follow the PCB in three pools; all concentrations are in µg/m³ = ng/L (OpenHydroQual labels them g/m³, as in M1 with temperature: enter and read the numbers in ng/L):
- Cd, dissolved (Chemical constituent), and Cp, on suspended particles (Chemical constituent): both flow with the water.
- Cb, on the bed (Immobile constituent): \(C_b = w_b \times \text{Bed} = 2 \times 10{,}000 = 20{,}000\) µg/m³ at the start.
Add the three constituents, two parameters K_d = 5000 (L/kg) and k_s = 2 (day⁻¹), set Reach Cb:Concentration per volume of water = 20000 (everything else 0, including the inflow: the river upstream is clean), and three reactions:
| Reaction | Rate expression | Stoichiometry | Meaning |
|---|---|---|---|
| Sorption | k_s*(K_d*SS*0.000001*Cd-Cp) | Cd −1, Cp +1 | Module 6 kinetics toward \(C_p = K_d\,SS\,C_d\); negative = desorption |
| Contaminant_deposition | w_s*_pos(1-tau_b/tau_cd)*Cp/depth | Cp −1, Cb +1 | particulate PCB deposits with the particles (zero in the flood) |
| Contaminant_erosion | M_e*_pos(tau_b/tau_ce-1)*Cb/(Bed+K_b)/depth | Cp +1, Cb −1 | eroded mud brings its PCB: \((E/H)\times C_b/\text{Bed} = (E/H)\,w_b\) |
Predict the steady state. Adding the balances for Cd and Cp, sorption cancels, so the total leaving equals what erosion supplies; the split then follows from the Cd balance:
\[ C_T = \frac{E\,A\,w_b}{Q} = \frac{9258 \times 160{,}000 \times 2}{10{,}368{,}000} = 285.7\ \text{ng/L}, \qquad \frac{C_d}{C_T} = \frac{k_s\tau}{1 + k_s\tau + k_sK_d\,SS\,\tau} = \frac{0.139}{1 + 0.139 + 0.238} = 0.101 \]so \(C_d = 28.8\) ng/L and \(C_p = 256.9\) ng/L. At equilibrium with 343 mg/L of SS the dissolved share would be \(1/(1 + K_dSS) = 36.8\) %: the water spends only 1.7 hours in the reach, much less than the 12-hour sorption time scale \(1/k_s\).
Checkpoints
Read these from your own runs; small differences in the last digit are normal. The "formula" column is the exact solution (Stages 1–2) or, for times before steady state in Stage 3, a numerical solution of the same equations (fourth-order Runge–Kutta, computed by the instructor).
| Stage | Quantity | Model | Formula |
|---|---|---|---|
| 1 | Reach SS at 0.5 / 1 / 5 days (g/m³) | 53.66 / 51.39 / 50.13 | 53.64 / 51.38 / 50.13 |
| 1 | Reach Bed at 5 days (g/m³) and areal bed (kg/m²) | 18,086.9 (45.22) | 18,086.9 (45.22) |
| 1 | Bed gain per day × depth, days 3–5 (g/(m²·day)) | 42.6 | 42.6 |
| 2 | Reach SS at 0.25 / 0.5 / 2 days (g/m³) | 338.45 / 342.72 / 342.85 | 338.97 / 342.77 / 342.85 |
| 2 | Reach Bed at 2 days (g/m³) and areal bed (kg/m²) | 5,885.8 (26.49) | 5,885.8 (26.49) |
| 3 | Reach Cd at 0.25 / 1 / 2 days (ng/L) | 26.35 / 28.82 / 28.82 | 26.58 / 28.82 / 28.82 |
| 3 | Reach Cp at 0.25 / 1 / 2 days (ng/L) | 250.6 / 256.9 / 256.9 | 251.3 / 256.9 / 256.9 |
| 3 | Cb/Bed at any time (µg/g) | 2.0000 | 2.0000 |
The bed in Stage 2 agrees with the exact solution at 2 days, and its rate of loss after the first hour agrees with \(E\) to within 0.02 %. Cd and Cp lag the exact curve by up to about 1 % in the first hours (Step 6), so compare from 0.5 day on for the closest match.
Explore
Save a copy with File → Save as and change one thing at a time.
- The dead band. In Stage 1, set tau_b to 0.25 Pa (between \(\tau_{cd}\) and \(\tau_{ce}\)). What happens to SS and Bed, and why?
- Running out of mud. In Stage 2, set the bed to 1000 g/m³ (4.5 kg/m²) and run 2 days. When does erosion stop, and what does SS do then? Compare the time with \(m_b/E\).
- Settling removes a contaminant. Add Cd, Cp and the sorption reaction to Stage 1 (low flow) with a clean bed and 100 ng/L total PCB in the inflow, in equilibrium (\(f_p\) at 60 mg/L). Compare the outflow total with \(1/(1 + f_pk_{dep}\tau)\) from Module 9, Section 6. Why is the agreement only approximate?
- Fast sorption. In Stage 3, set k_s to 200 day⁻¹. Does the dissolved share approach the equilibrium 36.8 %?
- Shields for sand. If the bed were 0.5 mm sand instead of mud, would the flood move it? Use Module 9, Section 3 (\(\tau_c = 0.25\) Pa).
Troubleshooting
| SS does not change. | A reaction's stoichiometric constants are both 0, or tau_b is in the dead band between tau_cd and tau_ce. Check the rate expression for typos: parameter names are case-sensitive. |
| The bed goes negative. | The erosion expression is missing the factor Bed/(Bed+K_b), or K_b is 0. |
| The Outlet gains SS from nowhere. | Same cause: without the bed factor, the Erosion reaction also runs in the Outlet, which has no bed. |
| The bed or SS change much too fast. | The depth parameter is missing from the denominator, or the flood values were entered in m³/s instead of m³/day. |
| Stage 3: Cd and Cp stay at 0. | Cb:Concentration per volume of water in the Reach is 0, or the Contaminant_erosion stoichiometry is reversed. |
| The first hour is off in Stage 2. | Use an initial time step of 0.001 (Step 6). |
What to submit
- Your three
.ohqfiles. - Your hand calculation of \(\tau_b\) for both flows (Module 9, Section 2) and of \(P_d\), \(k_{dep}\) and \(E\).
- One plot per stage (SS and Bed for Stages 1–2; Cd and Cp for Stage 3) with the formula values tabulated beside the model's at three times.
- Short answers (2–4 sentences each): (a) Why does the reach deposit at low flow but erode in the flood, although the sediment and the bed are the same? (b) In Stage 3, why is so little of the PCB dissolved, and what will happen to the dissolved fraction downstream of the reach? (c) Your result for one Explore item, with a sentence explaining it.
Submit everything in one PDF plus the .ohq files in Brightspace → Assignments → Modeling Assignment M9.