What you will build
A closed, completely mixed batch reactor: one Reactor block with no inflow and no links, so the only thing that changes a concentration is reaction (Module 2, Section 1: \(dC/dt = r\)). You will add a first-order reaction A → B, extend it to the series network A → B → C, and then race three substances that start at the same rate but follow different rate laws.
| Stage | What changes | What to look for | Saved as |
|---|---|---|---|
| 1 | A → B, first order, \(k_1 = 0.3\) d⁻¹ | \(A = 100e^{-0.3t}\), \(t_{1/2} = 2.31\) d, \(A + B = 100\) | M2_stage1_first_order.ohq |
| 2 | + C and B → C, \(k_2 = 0.1\) d⁻¹ | B peaks at \(t_{\max} = 5.49\) d at 57.7 g/m³; \(A + B + C = 100\) | M2_stage2_series.ohq |
| 3 | three substances: first order, second order, saturating | same initial rate (5 g/m³/d), very different tails | M2_stage3_rate_laws.ohq |
The system
| Item | Value |
|---|---|
| Batch reactor | one Reactor block, \(V = 1\) m³, no inflow, no links (any volume gives the same concentrations) |
| Stages 1–2 | \(A_0 = 100\) g/m³, \(B_0 = C_0 = 0\); \(k_1 = 0.3\) d⁻¹, \(k_2 = 0.1\) d⁻¹ |
| Stage 3 | each substance starts at 10 g/m³; first order \(k = 0.5\) d⁻¹; second order \(k = 0.05\) m³/(g·d); saturating \(k_{\max} = 10\) g/(m³·d), \(K = 10\) g/m³ |
| Simulation | 0–20 days (Stage 1), 0–40 days (Stage 2), 0–15 days (Stage 3) |
OpenHydroQual adds to every block's balance a reaction term \(\nu\,r\,V\) for each reaction, where \(r\) is your rate expression (per unit volume, g/m³/day) and \(\nu\) the stoichiometric constant of that constituent (negative for a reactant, positive for a product). This is exactly the bookkeeping of Module 2, Sections 1 and 6.
Build: 1 Constituents 2 Batch 3 Rate constant 4 Reaction 5 Settings
Stages: 1 First order 2 Series 3 Three rate laws Checkpoints Explore Troubleshooting What to submit
1New model, plugin and two constituents
Start a new model and load the Mass Transfer plugin (M1, Step 1). Create two Chemical constituents (M1, Step 2) and rename them A and B. Leave the diffusion coefficient and dispersivity at 0.


2The batch: a Reactor with no flow
Add one Reactor block (M1, Step 3). This time it gets no inflow and no links: nothing enters or leaves, so it is a batch.
| Property | Value | Meaning | |
|---|---|---|---|
| 1 | A:Concentration | 100 g/m³ | initial concentration of A, \(A_0\) |
| 2 | B:Concentration | 0 g/m³ | no B at the start |
| 3 | Initial Storage | 1 m³ | the volume; with no flow it never changes |
| 4 | Constant Inflow | 0 m³/day | no flow: a closed batch |
| 5 | Name | Batch |
3A rate constant: the Reaction Parameter
Rate constants are stored as Reaction Parameters, named values that any reaction can use. Choose Add Objects → Chemistry → Reaction Parameter. A new parameter appears under Reaction Parameters in the Object Browser.
The "Arrhenius temperature correction factor" is the \(\theta\) of Module 2, Section 4: OpenHydroQual computes the parameter as Value × θ(T − Tref). With θ = 1 the temperature does not matter. The units of the value are whatever your rate expression needs: here 1/day, because the expression will be \(k_1A\).
4The reaction A → B
Choose Add Objects → Chemistry → Chemical reaction. A reaction has a rate expression, which is \(|r|\) of Module 2 in g/m³/day, and one stoichiometric constant for every constituent. OpenHydroQual multiplies the rate by each constant: −1 means "consumed at the rate", +1 "produced at the rate", 0 "not involved".
| Property | Value | Meaning | |
|---|---|---|---|
| 1 | A:Stoichiometric Constant | −1 | A is consumed: \(dA/dt = -k_1A\) |
| 2 | B:Stoichiometric Constant | 1 | one B is made per A: \(dB/dt = +k_1A\) |
| 3 | Name | A_to_B | no spaces |
| 4 | Rate Expression | k1*A | the first-order rate law, using the parameter and the constituent by name |
k1*A and press Enter. (The saved file shows it in parentheses, (k1*A); that is the same expression.)Why is the rate positive and the stoichiometric constant negative?
5Simulation time and time step
As in M1, Step 6: General Settings → Simulation end time 20 days; Solver Settings → initial time-step 0.01 and maximum allowable time-step increase factor 5.

Stage 1First-order decay, A → B
Save as M2_stage1_first_order.ohq and press Run Model.



Check the half-life yourself: read the time at which A crosses 50, 25 and 12.5 g/m³. For a first-order reaction the three intervals are equal (Module 2, Section 2).
Stage 2A series network, A → B → C
Save a copy as M2_stage2_series.ohq. Add:
- a third constituent, C (initial concentration 0 in Batch);
- a second Reaction Parameter, k2 = 0.1;
- a second reaction, B_to_C, with rate expression
k2*Band stoichiometric constants A = 0, B = −1, C = 1.
Check that the first reaction now has C:Stoichiometric Constant = 0 (new constituents start at 0 in existing reactions). Set the end time to 40 days, save and run.


k2*B.Before you look at the results, predict the peak with Module 2, Section 6:
\[ t_{\max} = \frac{\ln(k_1/k_2)}{k_1 - k_2} = \frac{\ln 3}{0.2} = 5.49\ \text{days}, \qquad B_{\max} = 100\left(\frac{0.1}{0.3}\right)^{0.1/0.2} = 57.7\ \text{g/m}^3 . \]

Stage 3Three rate laws, one starting rate
Start a new model (or save a copy and delete A, B, C and both reactions). Create three constituents named First, Second and Saturating, each starting at 10 g/m³ in Batch. Each is destroyed by its own rate law; none makes a product you need to track.
| Reaction | Rate Expression | Stoichiometric constants | Parameters | Initial rate at 10 g/m³ |
|---|---|---|---|---|
| first_order | k_first*First | First −1, others 0 | k_first = 0.5 (1/d) | 0.5 × 10 = 5 |
| second_order | k_second*Second^2 | Second −1, others 0 | k_second = 0.05 (m³/(g·d)) | 0.05 × 10² = 5 |
| saturating | kmax*Saturating/(K_half+Saturating) | Saturating −1, others 0 | kmax = 10 (g/(m³·d)), K_half = 10 (g/m³) | 10 × 10/20 = 5 |
All three start at 5 g/m³/day, so for the first few hours they are indistinguishable. Set the end time to 15 days, save and run.
Compare the three models on one plot. Right-click Batch → Results → First:Concentration; keep this plot window open. Open Second:Concentration the same way in a second window, right-click its chart → Copy curve, then right-click the chart of the first window → Paste. Close the second window and do the same for Saturating:Concentration. All three curves are now on one panel, each in its own colour.


kmax*Saturating/(K_half+Saturating).
Compare with the formulas of Module 2: \(10e^{-0.5t}\), \(10/(1 + 0.5t)\), and for the saturating law \(t = [10\ln(10/S) + (10 - S)]/10\), which you can evaluate at the model's concentrations.
Checkpoints
Read these from your own runs; small differences in the last digit are normal. Because of the time step (M1, Step 6), the model lags the formula slightly: it reacts a little more slowly, so its values sit about 0.5 % above the formula at day 2, and the gap grows as the concentration falls (about 1 % at day 5 and 2 % at day 10 in Stage 1).
| Stage | Quantity | Model | Formula |
|---|---|---|---|
| 1 | A at 2 / 5 / 10 days (g/m³) | 55.12 / 22.56 / 5.09 | 54.88 / 22.31 / 4.98 |
| 1 | Time A reaches 50 g/m³ (days) | 2.33 | 2.31 |
| 1 | A + B (g/m³), all times | 100.00 | 100 |
| 2 | B at 5 / 10 / 20 days (g/m³) | 57.25 / 47.68 / 20.01 | 57.51 / 47.71 / 19.93 |
| 2 | Peak of B: time (d) and value (g/m³) | 5.53 / 57.50 | 5.49 / 57.74 |
| 2 | C at 10 / 20 days (g/m³) | 47.22 / 79.73 | 47.31 / 79.82 |
| 3 | First / Second / Saturating at 2 days (g/m³) | 3.72 / 5.04 / 2.83 | 3.68 / 5.00 / 2.79 |
| 3 | First / Second / Saturating at 4 days (g/m³) | 1.39 / 3.36 / 0.50 | 1.35 / 3.33 / 0.48 |
Explore
Save a copy with File → Save as and change one thing at a time.
- Swap the rate constants. In Stage 2 set k1 = 0.1 and k2 = 0.3. Predict \(t_{\max}\) and \(B_{\max}\) first (the formula is symmetric in time but not in height). Why is the B peak so much lower?
- Fit a rate constant. A lab reports that A in a batch fell from 100 to 61, 37 and 14 g/m³ after 1, 2 and 4 days. Change k1 in Stage 1 until the model passes through these points, and compare your value with the slope of ln A against t.
- A parallel path. In Stage 2, add a constituent D and a reaction
kp*A(A −1, D +1) with kp = 0.2. Check that A now decays with \(k_1 + k_p\) and that the B peak drops (Module 2, Section 6). - Saturation. In Stage 3, change K_half to 1. Which two curves now nearly coincide at first, and why?
Troubleshooting
| Nothing happens: A stays at 100. | The rate expression refers to a name the model does not know yet (a typo, or a name that differs in upper/lower case), or A's stoichiometric constant is 0. Check both. |
| A rises instead of falling. | The stoichiometric constant of A is +1; a reactant needs −1. |
| A + B is not constant. | B's stoichiometric constant is not +1, or the block has a Constant Inflow or a link left over from M1. |
| In Stage 2, C never appears. | C's stoichiometric constant in B_to_C is 0, or the rate expression is k2*A instead of k2*B. |
| The second-order curve looks first order. | The expression must be k_second*Second^2 (or Second*Second), not k_second*Second*2. |
| The model values are a little above the formula. | That is the time step (M1, Step 6): the model reacts slightly more slowly than the formula, and the relative gap grows as the concentration gets small. A difference of a percent or two is normal. |
What to submit
- Your three
.ohqfiles. - Stage 1: a plot of A and B with the formula \(100e^{-0.3t}\) marked at five or more times, and the half-life read from your model.
- Stage 2: a plot of A, B and C; a table of model and formula values of B at 2, 5, 10 and 20 days; the model's peak time and height against the formulas.
- Stage 3: one plot of the three substances (copy and paste the curves into one plot window), with the formula values at 1, 2, 4 and 8 days tabulated beside the model's.
- Short answers (2–4 sentences each): (a) Why does B peak at the time when \(k_1A = k_2B\)? (b) In Stage 3 all three reactions start at the same rate. Explain, using the rate laws, why the second-order substance is left with the most after 8 days. (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 M2.