What you will build
Two new OpenHydroQual objects describe sorption: an Immobile constituent that holds the sorbed chemical (it stays where it is, and the links do not carry it), and a reaction that moves mass between the dissolved and the sorbed constituent toward the isotherm. You will use them first in a single bottle, then in six bottles that make up an isotherm experiment, and finally in the 80-cell column of Module 5.
| Stage | What changes | What to look for | Saved as |
|---|---|---|---|
| 1 | one bottle, linear isotherm, first-order kinetics | \(C = C_{\text{eq}} + (C_0 - C_{\text{eq}})e^{-k_s(1 + rK_d)t}\); \(C_{\text{eq}} = 5\) g/m³ | M6_stage1_batch_linear.ohq |
| 2 | six bottles, Langmuir isotherm | equilibrium points on the Langmuir curve; your fit recovers \(q_{\max}\) and \(K_L\) | M6_stage2_isotherm.ohq |
| 3 | the Module 5 column + sorption (fast) | front delayed by \(R = 3\): \(C/C_0 = \tfrac12\operatorname{erfc}\big[(Rx - vt)/(2\sqrt{DRt})\big]\) | M6_stage3_column_equilibrium.ohq |
| 4 | same column, slow sorption | earlier breakthrough, slower approach to \(C_0\); sorbed/dissolved below \(R - 1\) | M6_stage4_column_kinetic.ohq |
How the sorbed phase is represented
The Immobile constituent "Sorbed" has a concentration \(S\) in g per m³ of water, so that both constituents use the same units and the exchange conserves mass. If \(q\) is the sorbed amount per mass of solid (g/kg) and \(r\) the mass of solid per volume of water (kg/m³), then \(S = rq\). One reaction does all the work (Module 6, Section 5):
\[ \text{rate} = k_s\big(r\,q_{\text{eq}}(C) - S\big), \qquad \text{Chem: } -1,\quad \text{Sorbed: } +1 \]When \(S\) is below the isotherm the rate is positive (sorption); above it, negative (desorption). At equilibrium \(S = r\,q_{\text{eq}}(C)\), and for a linear isotherm \(S/C = rK_d\): in a bottle \(r = M_s/V\), in a column \(r = \rho_b/n\), and then \(S/C = R - 1\).
| Item | Stage 1–2 (bottles) | Stage 3–4 (column) |
|---|---|---|
| Water volume | 1 m³ per bottle (concentrations do not depend on it) | 0.4 m³ per cell (Module 5) |
| Solid per water, \(r\) | 100 kg/m³ (Stage 1, = 10 g of soil in 100 mL); 10 kg/m³ (Stage 2) | \(\rho_b/n = 1600/0.4 = 4000\) kg/m³ |
| Isotherm | \(K_d = 10\) L/kg = 0.01 m³/kg (Stage 1); Langmuir \(q_{\max} = 0.5\) g/kg, \(K_L = 0.2\) L/mg = 0.2 m³/g (Stage 2) | \(K_d = 0.5\) L/kg = 0.0005 m³/kg, so \(R = 1 + 4000 \times 0.0005 = 3\) |
| Rate constant \(k_s\) | 2 per day | 10 per day (Stage 3), 0.1 per day (Stage 4) |
| Simulation | 2 days (Stage 2: 3 days), initial time step 0.002 day | 100 days, initial time step 0.01 day; about 3 minutes per run |
- M6_stage1_batch_linear.ohq · M6_stage2_isotherm.ohq · M6_stage3_column_equilibrium.ohq · M6_stage4_column_kinetic.ohq
Build: 1 Plugin 2 Two constituents 3 Parameters 4 Reaction 5 Bottle 6 Settings
Stages: 1 Batch 2 Isotherm 3 Column 4 Slow sorption Checkpoints Explore Troubleshooting What to submit
1Load the Mass Transfer plugin
Start a new model and add Mass Transfer (File → Preferences → Add plugin), as in Module 1, Step 1. It provides the Reactor, the Fixed flow link and the Immobile constituent.


2Two constituents: the dissolved and the sorbed chemical
Add a Chemical constituent and rename it Chem (the dissolved chemical). Then add an Immobile constituent (per volume of water) from the same menu and rename it Sorbed. (Do not pick "Sorbed constituent (per total volume)", which is a different object.)
3Reaction parameters: k_s, r and K_d
Add three Reaction Parameters (Add Objects → Chemistry → Reaction Parameter). For each, set the Value and the Name. If you did the Module 2 guide this is familiar.
| Name | Value (Stage 1) | Meaning |
|---|---|---|
| k_s | 2 | sorption rate constant, 1/day |
| r | 100 | solid per volume of water, kg/m³ (10 g of soil in 100 mL) |
| K_d | 0.01 | distribution coefficient in m³/kg (= 10 L/kg) |
Leave the Arrhenius factor at 1 and the temperature empty: no temperature correction.
4The sorption reaction
Add a Chemical reaction (Add Objects → Chemistry → Chemical reaction). Its properties list a stoichiometric constant for every constituent and a rate expression.
OpenHydroQual computes, in every block, rate × stoichiometric constant as the change of each concentration per day:
\[ \frac{dC}{dt} = -k_s(rK_dC - S), \qquad \frac{dS}{dt} = +k_s(rK_dC - S), \]which is Module 6's \(dq/dt = k_s(K_dC - q)\) multiplied by \(r\), together with the batch mass balance: what the water loses the solid gains, so \(C + S\) stays constant.
5The bottle: a Reactor with no flow
Add a Reactor. It has no inflow and no links: a closed batch bottle.

Why 1 m³ and not 100 mL?
6Simulation time and time step
Sorption in the bottle takes hours, not days, so use a finer time step than in Modules 1 and 5. In General Settings set the end time to 2 days. In Solver Settings set the initial time-step to 0.002 day and keep the maximum time-step increase factor at 5 (largest step 0.01 day ≈ 15 minutes).
Stage 1A batch test with a linear isotherm
Save as M6_stage1_batch_linear.ohq, run, and plot Bottle → Results → Chem:Concentration and Sorbed:Concentration per volume of water (each opens its own plot window).


\(rK_d = 100 \times 0.01 = 1\), so \(C_{\text{eq}} = 10/(1 + 1) = 5\) g/m³ and \(q_{\text{eq}} = K_dC_{\text{eq}} = 10 \times 5 = 50\) mg/kg (model: \(1000\,S/r = 1000 \times 5/100 = 50\)). The approach has the rate constant \(k_s(1 + rK_d) = 4\) per day:
\[ C(t) = 5 + 5\,e^{-4t}: \quad 6.84,\ 5.68,\ 5.09\ \text{g/m}^3 \text{ at } 0.25,\ 0.5,\ 1 \text{ day}. \]The model gives 6.87, 5.70 and 5.10. Half of the change happens in \(\ln 2/4 = 0.17\) day (4.2 h).
Stage 2An isotherm experiment: six bottles, Langmuir
Save a copy as M6_stage2_isotherm.ohq. A real isotherm experiment uses several bottles with different starting concentrations. You will do the same, with a Langmuir isotherm in the rate expression.
- Change parameter r to 10 (1 g of soil in 100 mL). Add two parameters: q_max = 0.5 (g/kg = 500 mg/kg) and K_L = 0.2 (L/mg). K_d is no longer used.
- Change the rate expression of Sorption to k_s*(r*q_max*K_L*Chem/(1+K_L*Chem)-Sorbed).
- Rename the bottle Bottle1 and give it Chem:Concentration 1. Copy and paste it five times (or add five Reactors with Initial Storage 1 m³) and name them Bottle2 … Bottle6 with Chem:Concentration 2.5, 5, 10, 20 and 40 g/m³.
- End time 3 days. Save and run.
For each bottle read Chem:Concentration (\(C\)) and Sorbed:Concentration (\(S\)) at 3 days, compute \(q = 1000\,S/r\) (mg/kg), and fit the Langmuir isotherm as in Module 6, Example 4b: regress \(C/q\) on \(C\).
Compare the bottles on one plot. Right-click Bottle1 → Results → Chem:Concentration and keep that plot window open. Open Bottle2's Chem:Concentration in a second window, right-click its chart → Copy curve, then right-click the chart of the Bottle1 window → Paste. Close the second window and repeat for Bottle3 … Bottle6 (more on this in the card of Stage 3).
At equilibrium \(C_0 = C + r\,q_{\max}K_LC/(1 + K_LC)\). Rearranged, \(K_LC^2 + (1 + K_Lrq_{\max} - K_LC_0)\,C - C_0 = 0\). With \(rq_{\max} = 5\) g/m³, \(K_L = 0.2\) and \(C_0 = 10\): \(0.2C^2 + (1 + 1 - 2)\,C - 10 = 0\), so \(C = \sqrt{50} = 7.07\) g/m³ and \(q = (10 - 7.07)/10 \times 1000 = 293\) mg/kg (model: 7.07 and 293).
Your fit through all six model bottles should give \(q_{\max} \approx 499\) mg/kg and \(K_L \approx 0.20\) L/mg, the values you put in. That is the point of the exercise: the bottles are a "virtual experiment" whose answer you know.
Stage 3Sorption in the Module 5 column
Open your M5_stage2_dispersion.ohq (80 cells, dispersivity 2 m, step input 100 g/m³ into Cell(1:1)) and save it as M6_stage3_column_equilibrium.ohq. Then:
- Keep the Tracer: it does not sorb, so it is your reference. Add a Chemical constituent Chem with the same dispersivity, 2 m, and the Immobile constituent Sorbed (Step 2).
- Give Cell(1:1) Chem:Constant Inflow concentration 100, the same as the Tracer. Chem and Tracer now enter the column together; only Chem sorbs.
- Add the parameters k_s = 10, r = 4000 (\(\rho_b/n = 1600/0.4\) kg/m³) and K_d = 0.0005 (0.5 L/kg), and the reaction Sorption of Step 4 with the linear rate expression.
- Set the end time to 100 days and the initial time-step back to 0.01.
- Save and run (about 3 minutes).
Before you run, predict: \(R = 1 + \rho_bK_d/n = 1 + 1600 \times 0.0005/0.4 = 3\). The middle of the Tracer front should reach Cell(20:1) at \(x/v = 20\) days, and the middle of the Chem front at \(Rx/v = 60\) days.
Open each curve in its own plot window (right-click the block → Results → the quantity). In the window you want to copy from, right-click the chart → Copy curve (it reads Copy Curves when the window holds several). In the window that collects the curves, right-click the chart → Paste. The pasted curve gets its own colour and legend entry and the axes rescale; close the source window and repeat.
OpenHydroQual keeps the copied curve when you open another file, so this also works across models: copy the Stage 3 curve, open the Stage 4 file and paste it into a Stage 4 plot. You do not need to rerun a model to plot it again: every run saves all results to output.txt in the model's folder. Open the model, choose Model → Load Results, pick output.txt and click OK at "Output file loaded successfully!"; Results → … then works as after a run. The next run in the same folder overwrites output.txt, so rename it (for example output_stage3.txt) if you want to keep it.
Module 6, Section 6 with the model's dispersivity \(\alpha + \Delta x/2 = 2.5\) m (Module 5), \(D = 2.5\) m²/day:
\[ \frac{C}{C_0} = \frac12\operatorname{erfc}\!\left(\frac{3(20) - 1(45)}{2\sqrt{2.5 \times 3 \times 45}}\right) = \frac12\operatorname{erfc}(0.408) = 0.282 \ \text{ at } t = 45 \text{ days}. \]The model gives 28.4 g/m³ at 45 days, 51.0 at 60 and 68.8 at 75 (formula 28.2, 50.0, 67.3).
Also plot Sorbed:Concentration per volume of water in Cell(20:1): at every time it is twice the dissolved concentration (\(S/C = rK_d = R - 1 = 2\)); at 100 days, \(S = 172.8\) and \(C = 86.4\) g/m³. In mg/kg of grains, \(q = nS/\rho_b \times 1000 = 43.2\) mg/kg, the same as \(K_dC\). Two thirds of the chemical in the column is on the grains.
Stage 4Slow sorption
Save a copy as M6_stage4_column_kinetic.ohq, set k_s to 0.1 per day, save, and run. Plot Cell(20:1) Chem:Concentration and compare it with Stage 3 on one panel: before you open the Stage 4 file, plot the Stage 3 Cell(20:1) Chem:Concentration and right-click it → Copy curve; after the Stage 4 run, right-click the Stage 4 plot → Paste. (Or open Stage 3 later and load its saved outputs, as in the card above.)
Why? The water spends about 1 day in each cell, but the chemical needs \(1/k_s = 10\) days to sorb. Some of it passes cells before it has had time to sorb, so it runs ahead of the equilibrium front; the grains behind it are still "hungry" and keep taking chemical out of the water long after the front has passed, so the curve creeps up to \(C_0\). Check it in Cell(20:1): the ratio Sorbed/Chem is only 1.35 at 40 days and 1.61 at 60 days, below the equilibrium value of 2, and is still rising (1.86) at 100 days.
A deeper check (CEE 566): kinetics change the shape, not the mean
Checkpoints
Read these from your own runs; small differences in the last digit are normal.
| Stage | Quantity | Model | Formula |
|---|---|---|---|
| 1 | Bottle C at 0.25 / 0.5 / 1 day (g/m³) | 6.87 / 5.70 / 5.10 | 6.84 / 5.68 / 5.09 |
| 1 | C and S at 2 days (g/m³); q (mg/kg) | 5.00, 5.00; 50.0 | 5, 5; 50 |
| 2 | C at 3 days, Bottles 1–6 (g/m³) | 0.525 / 1.404 / 3.091 / 7.074 / 16.19 / 35.63 | 0.525 / 1.404 / 3.090 / 7.071 / 16.18 / 35.62 |
| 2 | q at 3 days, Bottles 1–6 (mg/kg) | 47.5 / 109.6 / 190.9 / 292.6 / 381.2 / 437.4 | 47.5 / 109.6 / 191.0 / 292.9 / 382.0 / 438.5 |
| 2 | Langmuir fit (C/q vs C) | qmax 499 mg/kg, KL 0.201 L/mg | 500, 0.2 |
| 3 | Cell(20:1) C at 45 / 60 / 75 days (g/m³) | 28.4 / 51.0 / 68.8 | retarded erfc 28.2 / 50.0 / 67.3 |
| 3 | Tracer (no sorption), Cell(20:1): C at 15 / 20 / 25 days; time to 50 g/m³ | 28.3 / 50.9 / 68.8; 19.8 d | erfc with R = 1: 28.2 / 50.0 / 67.3; \(x/v = 20\) d |
| 3 | Cell(20:1) time to 50 g/m³ (days) | 59.3 | \(Rx/v = 60\) |
| 3 | Cell(30:1) C at 67.5 / 90 days | 24.4 / 51.0 | 24.0 / 50.0 |
| 3 | Cell(20:1) S/C at 40 / 100 days | 1.99 / 2.00 | \(R - 1 = 2\) |
| 4 | Cell(20:1) C at 20 / 40 / 60 / 100 days (g/m³) | 10.4 / 32.3 / 53.4 / 81.3 | (Stage 3: 1.2 / 20.8 / 51.0 / 86.4) |
| 4 | Cell(20:1) S/C at 40 / 60 / 100 days | 1.35 / 1.61 / 1.86 | below 2 (not at equilibrium) |
Explore
- A Freundlich bottle set. In Stage 2, replace the rate expression with
k_s*(r*K_F*Chem^0.6-Sorbed)(add K_F = 0.05 g/kg per (g/m³)0.6). Fit log q against log C: do you get the exponent 0.6 back? - More soil. In Stage 1, double r. Predict \(C_{\text{eq}}\) and the half-time before you run. Why does the bottle reach equilibrium faster?
- Stronger sorption in the column. In Stage 3, double K_d. Predict R and the time to 50 g/m³ at Cell(10:1).
- Flushing. Run Stage 3 to 100 days, then set the inflow concentration to 0 and continue (or start a run with the column already loaded). Compare how long the sorbing chemical takes to leave with the time for the tracer of Module 5.
Troubleshooting
| Nothing sorbs; Chem stays at 10. | The rate expression refers to a name the model does not know: check the spelling of Chem, Sorbed and the parameters (upper/lower case matters). |
| Chem drops to a much lower value than 5. | K_d was entered in L/kg (10) instead of m³/kg (0.01). |
| Chem and Sorbed do not add up to the starting value. | The stoichiometric constants must be −1 (Chem) and +1 (Sorbed). |
| The column front still arrives at 20 days. | A reaction parameter name is misspelled in the rate expression, or r is 1600 instead of 4000 (use \(\rho_b/n\)). |
| Sorbed chemical moves along the column. | "Sorbed" was created as a Chemical constituent instead of an Immobile constituent. |
| The batch curve is jagged in the first hour. | The time step is too long: set the initial time-step to 0.002 day. |
What to submit
- Your four
.ohqfiles. - Stage 1: the model's C(t) with the formula on the same plot (at least five times).
- Stage 2: a table of C, S and q for the six bottles; your C/q vs C regression and the fitted qmax and KL; a plot of the six points with the fitted Langmuir curve.
- Stages 3–4: Cell(20:1) breakthrough curves for both stages and for the Module 5 tracer on one plot, with the retarded erfc formula.
- Short answers (2–4 sentences each): (a) Why is Sorbed/Chem equal to 2 in Stage 3 but smaller in Stage 4? (b) In Stage 4, why does chemical arrive earlier although \(K_d\) is the same? (c) In Stage 1, what would \(C_{\text{eq}}\) be with 5 g of soil in 100 mL? (d) Your result for one Explore item.
Submit everything in one PDF plus the .ohq files in Brightspace → Assignments → Modeling Assignment M6.