What you will build
An 80 m long flow path through sand, cut into 80 cells of 1 m. Each cell is a small Reactor holding the pore water of that metre, and Fixed flow links pass the water from cell to cell at a seepage velocity of 1 m/day. You will feed a tracer continuously at the inlet, first with no dispersion and then with a dispersivity of 2 m, and finally follow a spill. Every stage is checked against the formulas of Module 5. The same chain could just as well be a pipe or a river reach: only the volume, flow and dispersivity would change.
| Stage | What changes | What to look for | Saved as |
|---|---|---|---|
| 1 | step input of 100 g/m³ at the inlet, dispersivity 0 | a smeared front anyway: tanks in series, \(\alpha_{\text{num}} = \Delta x/2 = 0.5\) m | M5_stage1_advection.ohq |
| 2 | + dispersivity \(\alpha = 2\) m | \(C/C_0 = \tfrac12\operatorname{erfc}\big[(x - vt)/(2\sqrt{Dt})\big]\) with \(\alpha + \Delta x/2 = 2.5\) m | M5_stage2_dispersion.ohq |
| 3 | no inflow tracer; a spill of 1000 g/m³ in Cell(10:1) | a Gaussian moving at 1 m/day, peak falling as \(1/\sqrt t\) | M5_stage3_pulse.ohq |
The system
| Item | Value |
|---|---|
| Flow path | 80 m long, cross-section \(A = 1\) m², porosity \(n = 0.4\); 80 cells of \(\Delta x = 1\) m |
| Water in one cell | pore volume \(nA\Delta x = 0.4\) m³ (the Reactor's Initial Storage) |
| Flow | seepage velocity \(v = 1\) m/day, so \(Q = vnA = 0.4\) m³/day through every link; each cell's residence time is \(\tau_c = 0.4/0.4 = 1\) day |
| Inlet | Cell(1:1) receives the inflow, 0.4 m³/day, at 100 g/m³ (Stages 1–2) or 0 (Stage 3) |
| Outlet | a very large Reactor that collects what leaves Cell(80:1) |
| Position | Cell(\(j\):1) is compared with \(x = j\) m: its water has passed through \(j\) cells |
| Simulation | 0 to 60 days (Stage 3: 0 to 40 days); each run takes 30–70 seconds |
OpenHydroQual writes the mass balance of every cell, exactly as for the tank in Module 1. Between neighbouring cells it adds a dispersive exchange \(\dfrac{D\,\text{area} + \alpha Q}{\text{length}}\,(C_i - C_{i+1})\), the finite-difference form of Fick's law (Module 5, Section 6).
Build: 1 Plugin 2 Constituent 3 Cells 4 Inlet 5 Outlet 6 Settings
Stages: 1 Advection 2 Dispersion 3 Spill Checkpoints Explore Troubleshooting What to submit
1Load the Mass Transfer plugin
Start a new model and add the Mass Transfer plugin, as in Module 1 (Step 1): File → Preferences → Add plugin.


2Create the tracer and look at its transport properties
Add a Chemical constituent (Add Objects → Chemistry → Chemical constituent) and rename it Tracer, as in Module 1, Step 2. This time look at two properties you left alone in Module 1:
3Create the 80 cells with the Array Generator
Eighty Reactors and seventy-nine links are far too many to draw one at a time. OpenHydroQual can generate a row of identical blocks joined by identical links. Open Add Objects → Create 2D Array.
3a · Select Components
3b · Block Properties
| Property | Value | Meaning | |
|---|---|---|---|
| 1 | Initial Storage | 0.4 m³ | pore water in one metre: \(nA\Delta x = 0.4 \times 1 \times 1\) |
| 2 | Tracer:Concentration | 0 g/m³ | the cells start clean |
| 3 | Constant Inflow | 0 | only Cell(1:1) gets an inflow (Step 4) |
| 4 | Name | Cell | the cells become Cell(1:1) … Cell(80:1) |
With the pointer over a unit box, the mouse wheel changes the unit (m³ becomes ft³) without telling you. Scroll with the pointer over the property names.
3c · Link Properties (x-x)
Why is each cell a Reactor with only 0.4 m³ in it?
4Feed the inlet: Cell(1:1)
Expand Blocks in the Object Browser and click Cell(1:1). Give it the inflow, exactly as you gave the tank its inflow in Module 1.
This is a "continuous source" (Module 5, Section 5b): from \(t = 0\) the water entering the column carries 100 g/m³.
5Add the Outlet and the last link
Add a Reactor named Outlet with an Initial Storage of 1e+06 m³, as in Module 1, Step 4, and drag it just past the right end of the row. Then choose Fixed flow and drag from Cell(80:1) to Outlet; set its flow rate to 0.4 m³/day.


6Simulation time and time step
As in Module 1, Step 6: in Settings → General Settings set the end time to 60 days, and in Solver Settings keep the initial time-step at 0.01 and set the Maximum allowable time-step increase factor to 5.

The time step matters more here than in Module 1. In one step the water moves \(v\Delta t\); a long step smears the front over that distance, which looks just like extra dispersion (about \(v\Delta t/2 = 0.025\) m here, small next to the 0.5 m from the cells).
Stage 1Advection only
Save the model as M5_stage1_advection.ohq, close it and open it again, then press Run Model and confirm. The run takes about a minute.


Right-click Cell(40:1) (zoom in on the row to find it) → Results → Tracer:Concentration. Do the same for Cell(20:1).
Why is the front smeared when the dispersivity is zero?
Each cell is completely mixed, so tracer entering it reaches its outlet at once: the chain is the tanks-in-series reactor of Module 4. For a step input the concentration in the 40th tank, with \(\tau_c = 1\) day, is
\[ \frac{C_{40}}{C_0} = 1 - e^{-t}\sum_{k=0}^{39}\frac{t^k}{k!} \qquad\Rightarrow\qquad 4.6,\ 52.1,\ 93.5\ \text{g/m}^3 \text{ at } 30, 40, 50 \text{ days}, \]which the model reproduces. Module 5, Section 6 showed that this is the same as the ADE with a numerical dispersivity \(\alpha_{\text{num}} = \Delta x/2 = 0.5\) m: \(C/C_0 = \tfrac12\operatorname{erfc}\big[(40 - t)/(2\sqrt{0.5\,t})\big]\) gives 3.4, 50.0 and 92.1. The lesson for every model you build: cutting space into mixed cells adds dispersion of its own.
Stage 2Add dispersion
Click Tracer under Constituents and set its Dispersivity to 2 m. Save as M5_stage2_dispersion.ohq and run. Plot Cell(20:1) and Cell(40:1) again.
The model's dispersivity is the one you entered plus the cells' own: \(\alpha + \Delta x/2 = 2.5\) m, so \(D = 2.5 \times 1 = 2.5\) m²/day. The first term of the continuous-source solution:
\[ \frac{C}{C_0} = \frac12\operatorname{erfc}\!\left(\frac{40 - 30}{2\sqrt{2.5 \times 30}}\right) = \frac12\operatorname{erfc}(0.577) = 0.207 \quad\Rightarrow\quad 20.7\ \text{g/m}^3 \]The model gives 21.0 g/m³. With the 2 m you entered, without the numerical part, the formula gives 18.1 g/m³.
Why only the first erfc term? The second term of the Ogata–Banks solution belongs to an inlet held at exactly \(C_0\). The model's inlet instead adds mass at the rate \(QC_0\) (a flux inlet), for which the first term alone is the better approximation; it matches the model to within 1.5 g/m³ at all times.
Also read the times when Cell(40:1) reaches 15.9 and 84.1 g/m³ (\(t_{16}\) and \(t_{84}\)), and estimate \(D\) as in Module 5, Section 5c: \(\sigma_t = (t_{84} - t_{16})/2\), \(D = \sigma_t^2v^3/(2x)\). The model gives \(t_{16} = 28.0\) and \(t_{84} = 56.0\) days, so \(\sigma_t = 14.0\) days and \(D = 2.44\) m²/day: close to the 2.5 m²/day the model "really" has.
Stage 3A spill
Save a copy as M5_stage3_pulse.ohq. Now the inflow is clean and the tracer starts in one cell, the computer's version of the instantaneous release of Module 5, Section 5a.
- Cell(1:1): Tracer:Constant Inflow concentration 0 (keep the inflow 0.4 m³/day).
- Cell(10:1): Tracer:Concentration 1000 g/m³. The mass per unit water area is \(M/(nA) = C\,\Delta x = 1000\) g/m², centred at \(x_0 = 10\) m.
- General Settings: end time 40 days.
Save and run. Then open Model → Visualize, choose Tracer:Concentration, and move the time slider to 10, 20 and 30 days. Hover over a cell to read its value.
Centre: \(x_0 + vt = 10 + 20 = 30\) m (model: 30.0 m, peak in Cell(30:1)). With the model's dispersivity, \(D = 2.5\) m²/day:
\[ C_{\max} = \frac{M/(nA)}{\sqrt{4\pi D t}} = \frac{1000}{\sqrt{4\pi(2.5)(20)}} = 39.9\ \text{g/m}^3, \qquad \sigma = \sqrt{2Dt} = 10.0\ \text{m} \]The model gives 39.8 g/m³ and a spread (standard deviation of the cell values) of 9.96 m. With \(\alpha = 2\) m alone the formula would give 44.6 g/m³. The total mass stays at 1000 g/m² until the cloud reaches the outlet.
Checkpoints
Read these from your own runs; small differences in the last digit are normal.
| Stage | Quantity | Model | Formula |
|---|---|---|---|
| 1 | Cell(40:1) C at 30 / 40 / 50 days (g/m³) | 5.0 / 51.9 / 93.1 | tanks in series 4.6 / 52.1 / 93.5 |
| 1 | Cell(20:1) C at 15 / 20 / 25 days (g/m³) | 13.0 / 52.8 / 86.0 | tanks in series 12.5 / 53.0 / 86.6 |
| 2 | Cell(40:1) C at 30 / 40 / 50 days (g/m³) | 21.0 / 50.9 / 74.8 | erfc, α + Δx/2: 20.7 / 50.0 / 73.7 |
| 2 | Cell(20:1) C at 15 / 20 / 25 days (g/m³) | 28.3 / 50.9 / 68.7 | erfc, α + Δx/2: 28.2 / 50.0 / 67.3 |
| 2 | D from \(t_{16}\), \(t_{84}\) at Cell(40:1) (m²/day) | 2.44 | 2.5 |
| 3 | Peak C at 10 / 20 / 30 days (g/m³) | 56.4 / 39.8 / 32.5 | Gaussian, α + Δx/2: 56.4 / 39.9 / 32.6 |
| 3 | Cell with the peak at 10 / 20 / 30 days | Cell(20:1) / (30:1) / (40:1) | \(x_0 + vt\) = 20 / 30 / 40 m |
| 3 | Cell(40:1): highest C and when | 33.1 g/m³ at 27.8 days | advective arrival 30 days |
Explore
Save a copy with File → Save as and change one thing at a time.
- Compensate for the cells. In Stage 2 set the dispersivity to 1.5 m. Now \(\alpha + \Delta x/2 = 2\) m: check that Cell(40:1) at 30 days matches the erfc formula with \(\alpha = 2\) m (18.1 g/m³).
- A river instead of an aquifer. Keep the 80 cells but think of them as 1 m slices of a small channel with 0.5 m² of water: Initial Storage 0.5 m³, flow 0.5 × 0.2 m/s × 86,400 = 8,640 m³/day. What end time and time step do you need now? What dispersivity corresponds to a dispersion coefficient of 0.5 m²/s?
- A faster flow. In Stage 2 double every flow (inflow and links) to 0.8 m³/day. Predict the arrival time and the front width at 40 m before you run; remember \(D = \alpha v\) doubles too.
- A larger spill cell. In Stage 3 put the 1000 g/m³ in Cell(10:1) and Cell(11:1). How do the mass and the peak change? Does the cloud keep its shape?
Troubleshooting
| Stage 2 looks exactly like Stage 1. | The Tracer's dispersivity is still 0: set it to 2 m and run again. |
| The concentrations explode once dispersion is on. | A link was drawn against the flow (from the Outlet to Cell(80:1), for example). Delete it and draw it in the flow direction. |
| The tracer never gets past Cell(1:1). | The link flow rate is 0: set 0.4 m³/day on every link (Array Generator, Link Properties). |
| Cell(1:1) overflows or empties. | The inflow and the link flows differ. Plot Storage of a few cells: it should stay at 0.4 m³. |
| The front arrives at the wrong time. | Check Initial Storage 0.4 m³ (not ft³) and the flow 0.4 m³/day in every link: \(\tau_c = 1\) day per cell. |
| The Array Generator will not take 150 cells. | It accepts at most 99 in each direction. |
| The run is slow. | 80 cells for 60 days takes about a minute. Close other programs; do not lower the time step further. |
What to submit
- Your three
.ohqfiles. - Stage 1 and Stage 2: a plot of Cell(40:1) against time with the tanks-in-series (Stage 1) or erfc (Stage 2) formula on the same axes, from your own spreadsheet, for at least five times.
- Stage 3: the concentration profile at 20 days (from Visualize or the cell results) with the Gaussian for \(\alpha = 2\) m and for \(\alpha = 2.5\) m.
- Short answers (2–4 sentences each): (a) Why did Stage 1 show a spread front although the dispersivity was zero? (b) From your Stage 2 breakthrough curve, estimate \(D\) from \(t_{16}\) and \(t_{84}\), and compare it with \(\alpha v\). (c) How many cells would you need over 80 m so that the numerical dispersivity is less than 10 % of 2 m, and why is that a problem in OpenHydroQual? (d) Your result for one Explore item.
Submit everything in one PDF plus the .ohq files in Brightspace → Assignments → Modeling Assignment M5.