Populations, chemistry & chaos

Reaction Kinetics Laboratory

A mass-action kinetics lab with six fixed reaction schemes of up to three species: the exact concentrations beside a 200-step RK4 simulation with its step ratio and stability limit, measurements of one species from a hidden mystery reaction with seeded noise or your own data, the fit error, the zero-, first- and second-order straight-line plots, sensitivity-based standard errors and identifiability, a grid best fit of k1, half-lives, the intermediate peak and the equilibrium constant. Five challenges are scored for you. For learning reaction kinetics and numerical simulation.

Last updated

Calculator overview

Inputs and outputs

This summary comes from the calculator's published input and output contract.

Inputs

Measurement time 8 (required)
About this input

The chosen time of measurement 8 in seconds, from 0 to 10000 (a marker on the time axis). Used with Chosen times when 8 is at most the number of measurements, and then it must lie within the duration.

Unit s Default 40 Range 0 to 10000
Measurement time 9 (required)
About this input

The chosen time of measurement 9 in seconds, from 0 to 10000 (a marker on the time axis). Used with Chosen times when 9 is at most the number of measurements, and then it must lie within the duration.

Unit s Default 45 Range 0 to 10000
My data (row i is measurement i; leave a row blank when it is not used)
When omitted Blank
About this input

Your own measurements of the observed species: up to 12 rows of a time in seconds (0 to 10000) and a concentration in mol/L (-1 to 20). Used with My data; at least 3 complete rows, each within the duration.

Default 0 rows
ColumnRange or allowed values
Time (s) 0 to 10000
Concentration (mol/L) -1 to 20
Measurement time 7 (required)
About this input

The chosen time of measurement 7 in seconds, from 0 to 10000 (a marker on the time axis). Used with Chosen times when 7 is at most the number of measurements, and then it must lie within the duration.

Unit s Default 35 Range 0 to 10000
Measurement time 4 (required)
About this input

The chosen time of measurement 4 in seconds, from 0 to 10000 (a marker on the time axis). Used with Chosen times when 4 is at most the number of measurements, and then it must lie within the duration.

Unit s Default 20 Range 0 to 10000
Measurement time 5 (required)
About this input

The chosen time of measurement 5 in seconds, from 0 to 10000 (a marker on the time axis). Used with Chosen times when 5 is at most the number of measurements, and then it must lie within the duration.

Unit s Default 25 Range 0 to 10000
Measurement time 6 (required)
About this input

The chosen time of measurement 6 in seconds, from 0 to 10000 (a marker on the time axis). Used with Chosen times when 6 is at most the number of measurements, and then it must lie within the duration.

Unit s Default 30 Range 0 to 10000
Mystery reaction (required)
About this input

The hidden reaction the virtual experiment measures, Mystery 1 to Mystery 6. A challenge uses its own.

Default Mystery 1 Allowed Mystery 1, Mystery 2, Mystery 3, Mystery 4, Mystery 5, Mystery 6
Rate constant k2 (required)
About this input

k2, the second rate constant in 1/s, from 0.0001 to 100: the back reaction of A <-> B, the second step of A -> B -> C, or the path to C of A -> B and A -> C. Ignored by the one-constant schemes.

Unit 1/s Default 0.05 Range 0.0001 to 100
Reaction (required)
About this input

The reaction scheme, chosen with the chips on the scheme glyph: A -> B, 2A -> B, A <-> B (reversible), A -> B -> C (two steps), A + B -> C or A -> B and A -> C (two parallel paths).

Default A -> B -> C Allowed A -> B, 2A -> B, A <-> B, A -> B -> C, A + B -> C, A -> B and A -> C
Measurement times (required)
About this input

Evenly spaced puts measurement i at i x D/n; Chosen times uses the markers you place on the time axis.

Default Evenly spaced Allowed Evenly spaced, Chosen times
Rate constant k1 (units depend on the reaction) (required)
About this input

k1, the rate constant of the first step, from 0.0001 to 100. Its unit depends on the reaction: 1/s for the first-order schemes, L/(mol*s) for 2A -> B and A + B -> C.

Default 0.2 Range 0.0001 to 100
Mystery reaction answer (required)
About this input

Keep hidden or Reveal: Reveal shows the mystery reaction and its constants (free play with the virtual experiment only).

Default Keep hidden Allowed Keep hidden, Reveal
Observed species (required)
About this input

The species measured and fitted: Species A, Species B or Species C. The straight-line plots need Species A.

Default Species A Allowed Species A, Species B, Species C
Random seed (required)
About this input

The seed of the noise stream, a whole number from 1 to 2147483646; the same seed gives the same measurements.

Default 2026 Range 1 to 2147483646
Starting concentration of B (required)
About this input

B0, the starting concentration of B in mol/L, from 0 to 10 (the start dot on the chart at t = 0).

Unit mol/L Default 0 Range 0 to 10
Starting concentration of C (required)
About this input

C0, the starting concentration of C in mol/L, from 0 to 10; at least one starting concentration must be above 0.

Unit mol/L Default 0 Range 0 to 10
Number of measurements (required)
About this input

n, the number of measurements of the virtual experiment, a whole number from 3 to 12.

Default 8 Range 3 to 12
Starting concentration of A (required)
About this input

A0, the starting concentration of A in mol/L, from 0 to 10 (the start dot on the chart at t = 0).

Unit mol/L Default 1 Range 0 to 10
Challenge (required)
About this input

Selects a challenge: 0 for none, 1 to 5 for a predefined challenge, which fixes the settings except the inputs it leaves to you.

Default 0 Range 0 to 5
Duration (simulated time) (required)
About this input

D, the simulated time in seconds, from 0.01 to 10000. The simulation takes 200 steps of D/200.

Unit s Default 60 Range 0.01 to 10000
Your prediction of the half-life of A
When omitted Blank
About this input

Challenge 1 only: your predicted half-life of A in seconds. The results appear once you predict.

Unit s Default Not set Range 0 to 10000
Measurement noise (required)
About this input

sigma, the standard deviation of the normal noise added to each virtual measurement, from 0 to 1 mol/L.

Unit mol/L Default 0.01 Range 0 to 1
Measurement time 12 (required)
About this input

The chosen time of measurement 12 in seconds, from 0 to 10000 (a marker on the time axis). Used with Chosen times when 12 is at most the number of measurements, and then it must lie within the duration.

Unit s Default 60 Range 0 to 10000
Measurement time 2 (required)
About this input

The chosen time of measurement 2 in seconds, from 0 to 10000 (a marker on the time axis). Used with Chosen times when 2 is at most the number of measurements, and then it must lie within the duration.

Unit s Default 10 Range 0 to 10000
Measurement time 3 (required)
About this input

The chosen time of measurement 3 in seconds, from 0 to 10000 (a marker on the time axis). Used with Chosen times when 3 is at most the number of measurements, and then it must lie within the duration.

Unit s Default 15 Range 0 to 10000
Measurement time 11 (required)
About this input

The chosen time of measurement 11 in seconds, from 0 to 10000 (a marker on the time axis). Used with Chosen times when 11 is at most the number of measurements, and then it must lie within the duration.

Unit s Default 55 Range 0 to 10000
Measurements from (required)
About this input

Where the measurements come from: Virtual experiment (the hidden mystery reaction with seeded noise) or My data (your table).

Default Virtual experiment Allowed Virtual experiment, My data
Measurement time 1 (required)
About this input

The chosen time of measurement 1 in seconds, from 0 to 10000 (a marker on the time axis). Used with Chosen times when 1 is at most the number of measurements, and then it must lie within the duration.

Unit s Default 5 Range 0 to 10000
Measurement time 10 (required)
About this input

The chosen time of measurement 10 in seconds, from 0 to 10000 (a marker on the time axis). Used with Chosen times when 10 is at most the number of measurements, and then it must lie within the duration.

Unit s Default 50 Range 0 to 10000

Outputs

Chart bottom
About this output

The bottom of the concentration chart (0, or below it when a noisy measurement is negative), mol/L.

Unit mol/L
Chart top
About this output

The top of the concentration chart, mol/L.

Unit mol/L
Observed species used
About this output

The observed species used.

No unit declared
Units of k1
About this output

The unit of k1 for the reaction used: 1/s or L/(mol*s).

No unit declared
Rate from the ln c plot (first order)
About this output

Minus the slope of ln c against time: the rate constant if the reaction is first order.

No unit declared
k2 used
About this output

The k2 the calculation used, in 1/s; blank for the one-constant reactions.

Unit 1/s
k1 used
About this output

The k1 the calculation used.

No unit declared
Formula module versions
About this output

The formula modules the model is built from, with their versions.

No unit declared
Measurement noise used
About this output

The noise of the virtual experiment, mol/L; blank with My data.

Unit mol/L
Measurements used
About this output

The number of measurements used.

No unit declared
Longest stable duration
About this output

The duration at which the step reaches the stability limit of 2.785, in seconds.

Unit s
Measurement source used
About this output

The measurement source used.

No unit declared
Model version
About this output

The model version.

No unit declared
Model Status
About this output

OK, a CHECK message (the simulation stopped, its step is beyond the stability limit, or its step is coarse), or a NOT VALID message naming the input to fix.

No unit declared
The measurements: time, measured value, the model value at your constants and the residual
About this output

The measurements: number, time, measured value, model value at your constants, residual and whether it is in the ln c and 1/c plots.

No unit declared
Time step
About this output

h = D/200, the simulation step in seconds.

Unit s
Step ratio (step x fastest rate)
About this output

The time step times the fastest rate at the start: above 1 the step is coarse, above 2.785 RK4 is unstable.

No unit declared
Standard error of k2
About this output

The standard error of k2 in 1/s; blank for the one-constant reactions or when the constants cannot be told apart.

Unit 1/s
Mystery k1 (revealed)
About this output

The mystery reaction's k1, shown only when revealed.

No unit declared
R squared of the c plot
About this output

R squared of concentration against time: how straight the zero-order plot is.

No unit declared
Mystery reaction (revealed)
About this output

The mystery reaction, shown only when you choose Reveal in free play.

No unit declared
Mystery k2 (revealed)
About this output

The mystery reaction's k2 in 1/s, shown only when revealed and used.

Unit 1/s
Standard error of k1
About this output

The standard error of k1 from these measurement times (the local, linearised approximation); blank when it cannot be estimated.

No unit declared
The reaction scheme: each step's left side, arrow, right side and rate constant
About this output

The scheme glyph rows: each step's left side, arrow, right side and rate constant.

No unit declared
Rate from the c plot (zero order)
About this output

Minus the slope of concentration against time: the rate constant if the reaction is zero order (species A observed).

No unit declared
Rate from the 1/c plot (second order)
About this output

The slope of 1/c against time: the rate constant if the reaction is second order.

No unit declared
Reaction used
About this output

The reaction the calculation used (a challenge may fix it).

No unit declared
Seed used
About this output

The seed of the noise stream; blank with My data.

No unit declared
R squared of the 1/c plot
About this output

R squared of 1/c against time.

No unit declared
Largest RK4 error
About this output

The largest difference between the simulated and exact concentrations over the computed rows, mol/L.

Unit mol/L
The three straight-line plots of the measurements of A: c, ln c and 1/c against time
About this output

The three straight-line plots of the measurements of A: time against c, ln c and 1/c.

No unit declared
Equilibrium constant k1/k2
About this output

For A <-> B: K = k1/k2, the ratio of B to A at equilibrium.

No unit declared
Duration used
About this output

The simulated time used, in seconds.

Unit s
The frames: time, the simulated (RK4) and exact A, B and C, the sensitivities of the observed species to k1 and k2, and the RK4 error, rows n = 0 to 200
About this output

The 201 frames of the run: time, the simulated (RK4) and exact A, B and C, the sensitivities of the observed species to k1 and k2, and the RK4 error.

No unit declared
Error scale
About this output

The measurement error the standard errors assume: the noise of the virtual experiment, or the residual standard error of your data, mol/L.

Unit mol/L
Final concentration of B
About this output

The exact concentration of B at the end of the run, mol/L.

Unit mol/L
Final concentration of A
About this output

The exact concentration of A at the end of the run, mol/L.

Unit mol/L
Correlation of the k1 and k2 estimates
About this output

The correlation of the k1 and k2 estimates: near 1 or -1 the measurements cannot separate the two constants.

No unit declared
Challenge result
About this output

No challenge selected, MET or NOT MET.

No unit declared
Best-fit sum of squares
About this output

The sum of squares at the best-fit k1.

No unit declared
Best-fit k1 (grid search)
About this output

The k1 of the grid search that fits the measurements best (one decade either side of your k1, about 2.3% fine), with k2 held.

No unit declared
Best-fit note
About this output

A note on the grid search: no dependence on k1, a tie, the best at the edge of the search, or a best fit within one decade.

No unit declared
Challenge feedback
About this output

Feedback on the selected challenge: the prompt to predict, the met text, or a hint.

No unit declared
Challenge score
About this output

100 when the selected challenge is met, else 0.

No unit declared
Challenge: the value scored
About this output

The value the challenge scores: the exact half-life (challenge 1), the fit error (2 and 3), the standard error of k2 (4) or the largest RK4 error (5).

No unit declared
Challenge goal
About this output

The goal of the selected challenge.

No unit declared
Starting concentration of B used
About this output

The starting concentration of B used, mol/L.

Unit mol/L
Starting concentration of A used
About this output

The starting concentration of A used, mol/L.

Unit mol/L
Can the constants be estimated?
About this output

Whether the measurements can estimate the rate constants, or tell k1 and k2 apart.

No unit declared
Starting concentration of C used
About this output

The starting concentration of C used, mol/L.

Unit mol/L
Measurements left out of the ln c and 1/c plots
About this output

The measurements at or below 1E-12 mol/L, left out of the ln c and 1/c plots.

No unit declared
Time of the peak of B
About this output

For A -> B -> C starting without B: the time at which B peaks, in seconds.

Unit s
Peak concentration of B
About this output

For A -> B -> C starting without B: the largest concentration of B, mol/L.

Unit mol/L
Half-life of A (from the simulation)
About this output

The half-life of A read from the simulated curve (interpolated at the first crossing), in seconds; blank when it does not cross.

Unit s
R squared of the ln c plot
About this output

R squared of ln c against time.

No unit declared
Final ratio B/A (simulation)
About this output

For A <-> B: B/A at the end of the simulation, which approaches K.

No unit declared
Final concentration of C
About this output

The exact concentration of C at the end of the run, mol/L.

Unit mol/L
The grid search: the 21 stage-1 and 21 stage-2 candidates for k1 and their sums of squares
About this output

The grid search: 21 stage-1 and 21 stage-2 candidates for k1 and the sum of squares of each.

No unit declared
Half-life of A (exact)
About this output

The time for A to fall to half its start, from the closed form of the reaction, in seconds; blank when A never halves.

Unit s
Fit error, sum of squares
About this output

The sum of the squared differences between the measurements and your model curve.

No unit declared
Fit error (RMSE)
About this output

The root mean square difference between the measurements and your model curve, mol/L.

Unit mol/L
This page is provided by LogicCommons for informational purposes only. Results are analysis outputs computed from the inputs you supply and are not professional advice. Verify all inputs and results independently.

LogicCommons is in beta. If a result, label, or reference looks wrong, tell us here; we read every message.

Methodology

Purpose and model boundary

This lab models six fixed reaction schemes of at most three species, A, B and C, with at most two rate constants, under the law of mass action: A -> B, 2A -> B, A <-> B (reversible), A -> B -> C (two steps in a row), A + B -> C, and A -> B and A -> C (two parallel paths). For each scheme the model computes the exact concentrations over time and, beside them, a numerical simulation of 200 classic fourth-order Runge-Kutta steps, with its step ratio and stability limit, so a stiff two-step reaction can be seen to zigzag and blow up while the exact curve stays smooth.

The data side takes up to 12 measurements of one observed species, either from a virtual experiment (a hidden mystery reaction run from your starting concentrations, with seeded normal noise) or from your own table. On them the model computes the fit error of your scheme and constants, the zero-, first- and second-order straight-line plots with their rate estimates, standard errors and identifiability of the constants from a sensitivity matrix, and a bounded grid search for the best-fitting k1. It also reports the half-life of A, the peak of the intermediate, the equilibrium constant, and five scored challenges.

It is a lab for learning how rate laws shape concentration curves, how the order of a reaction is read from straight-line plots, how well measurements can pin down rate constants, and when a numerical method can be trusted. It is not a method for fitting real laboratory data to publication standard: the schemes are fixed, the reactions are isothermal and well mixed, there is no enzyme or temperature model, and the best fit is a bounded grid search, not a full regression.

The model is the calculation authority. The page sends the values you set to the model and draws only what it returns: the reaction-scheme glyph, the simulated and exact concentration curves, the measurement dots, the species bars, the three straight-line plots, the sensitivity curves, the fit profile and the per-row error. The page computes no concentration, rate constant, fit, standard error or half-life itself.

Inputs and units

Concentrations are in mol/L and times in seconds. k1 is in 1/s for the first-order schemes and in L/(mol·s) for 2A -> B and A + B -> C; k2 is always in 1/s.

Input Meaning and unit
Reaction A -> B, 2A -> B, A <-> B, A -> B -> C (default), A + B -> C, or A -> B and A -> C.
Rate constant k1 0.0001 to 100 (default 0.2): the rate constant of the first step, in 1/s or L/(mol·s) by scheme.
Rate constant k2 0.0001 to 100 1/s (default 0.05): the back reaction of A <-> B, the second step of A -> B -> C, or the path to C of the parallel scheme. Ignored by the one-constant schemes.
Starting concentration of A, B and C 0 to 10 mol/L each (defaults 1, 0 and 0), with at least one above 0.
Duration 0.01 to 10000 s (default 60): the simulated time. The simulation takes 200 steps of duration/200.
Observed species Species A (default), B or C: the species measured and fitted. The straight-line plots need Species A.
Measurements from Virtual experiment (default) or My data.
Mystery reaction Mystery 1 (default) to Mystery 6: the hidden reaction the virtual experiment measures.
Number of measurements A whole number from 3 to 12 (default 8), for the virtual experiment.
Measurement times Evenly spaced (default: measurement i at i × duration / n) or Chosen times.
Measurement time 1 to 12 0 to 10000 s each (defaults 5, 10, ... 60): the chosen time of each measurement, used with Chosen times. A used time must lie within the duration.
My data Up to 12 rows of a time (0 to 10000 s) and a concentration (-1 to 20 mol/L). A row is used when both are filled; at least 3 complete rows within the duration are needed with My data.
Measurement noise 0 to 1 mol/L (default 0.01): the standard deviation of the normal noise added to each virtual measurement.
Random seed A whole number from 1 to 2147483646 (default 2026). The same seed gives the same measurements.
Mystery reaction answer Keep hidden (default) or Reveal: shows the mystery reaction and its constants, in free play with the virtual experiment only.
Challenge 0 for none, or 1 to 5.
Your prediction of the half-life of A Blank, or 0 to 10000 s: your answer for challenge 1. Blank means not yet predicted.

Every input except the prediction and the My data table is required, and each is checked on the value entered, even when the chosen scheme, source or plan does not use it.

Where each input is set:

  • On the canvas only: the reaction, with the chips on the scheme glyph; the three starting concentrations, as start dots at time 0 on the chart (a value can also be typed in the dot's popover); and, with Chosen times, the measurement times, as markers dragged along the time axis. None of these is in the input panel.
  • In the input panel: k1 and k2 (number boxes; k2 is hidden for the one-constant schemes), the duration (a number box), the observed species, the measurement source, the mystery reaction, the number of measurements, the sampling plan, the noise, the seed, the reveal setting (hidden while a challenge is selected), the My data table (shown with My data), and the challenge picker. The prediction box appears only while challenge 1 is selected.

Governing relationships

Rate laws (mass action). Writing A, B and C for the concentrations and A' for the rate of change of A:

  • A -> B: A' = -k1·A, B' = k1·A.
  • 2A -> B: A' = -k1·A², B' = k1·A²/2.
  • A <-> B: A' = -k1·A + k2·B, B' = k1·A - k2·B.
  • A -> B -> C: A' = -k1·A, B' = k1·A - k2·B, C' = k2·B.
  • A + B -> C: A' = B' = -k1·A·B, C' = k1·A·B.
  • A -> B and A -> C: A' = -(k1 + k2)·A, B' = k1·A, C' = k2·A.

A species a scheme does not use stays at its starting value.

Exact solutions. With A0, B0 and C0 the starting concentrations and t the time:

  • A -> B: A = A0·e^(-k1·t); B = B0 + (A0 - A).
  • 2A -> B: A = A0/(1 + k1·A0·t), so 1/A = 1/A0 + k1·t; B = B0 + (A0 - A)/2.
  • A <-> B: with K_s = k1 + k2, the equilibrium values A_e = k2·(A0 + B0)/K_s and B_e = k1·(A0 + B0)/K_s, and A = A_e + (A0 - A_e)·e^(-K_s·t), B = B_e + (B0 - B_e)·e^(-K_s·t).
  • A -> B -> C: A = A0·e^(-k1·t); B = B0·e^(-k2·t) + A0·k1·(e^(-k1·t) - e^(-k2·t))/(k2 - k1), which tends to A0·k1·t·e^(-k1·t) when k1 = k2; C from the mass balance, C = C0 + (A0 - A) + (B0 - B).
  • A + B -> C: from ln(B·A0/(A·B0)) = (B0 - A0)·k1·t, written in a form that stays exact when A0 and B0 are equal (then A = B = A0/(1 + k1·A0·t)) or when one of them is 0 (then nothing reacts); C = C0 + (A0 - A).
  • A -> B and A -> C: A = A0·e^(-(k1 + k2)·t); B = B0 + k1/(k1 + k2)·(A0 - A); C = C0 + k2/(k1 + k2)·(A0 - A).

The model evaluates these in forms that avoid subtracting nearly equal numbers. The exact solution is the curve the measurements are fitted against and the curve the simulation is measured from.

The simulation. The classic fourth-order Runge-Kutta method takes 200 steps of h = duration/200: four evaluations of the rate laws per step (at the start, twice at the half step, once at the full step), and an advance of h/6 times (k₁ + 2·k₂ + 2·k₃ + k₄). Concentrations are not clipped at 0, because a negative or growing value is how an unstable step shows itself. The run stops when any concentration exceeds 1000 times the total starting concentration; later rows are blank.

Step ratio and stability. Every scheme's fastest rate λ has a closed form, largest at the start: k1 for A -> B; 2·k1·A0 for 2A -> B; k1 + k2 for A <-> B and the parallel scheme; the larger of k1 and k2 for A -> B -> C; k1·(A0 + B0) for A + B -> C. The step ratio is h·λ. The Runge-Kutta method is stable on a decaying mode while the step ratio is at most about 2.785 (the root of r³ - 4r² + 12r - 24 = 0); above 1 the simulated curve already drifts from the exact one. The longest stable duration is 200 × 2.785.../λ.

The virtual experiment. Measurement i is taken at time τ_i: i × duration / n with Evenly spaced, or your chosen time. Its true value is the exact concentration of the observed species from the hidden mystery reaction, run from your starting concentrations. Noise is added: y_i = true_i + σ·z_i, where σ is the noise and z_i a standard normal value obtained by the inverse normal distribution from a uniform number of the Park-Miller minimal standard generator, s_(j+1) = 48271·s_j mod (2³¹ - 1), seeded with your seed. The first two generator outputs are discarded as a warm-up. A negative noisy measurement is kept.

Fit error. The model value at each measurement is your scheme's exact solution at τ_i with your constants. The residual is the measured minus the model value; the fit error is the sum of squared residuals (SSE) and its root mean square, RMSE = √(SSE/n).

Straight-line plots (Species A only). Against time the model plots c, ln c and 1/c, and reports minus the slope of c (the rate if the reaction is zero order), minus the slope of ln c (first order) and the slope of 1/c (second order), each with its R². A measurement at or below 1×10⁻¹² mol/L is left out of the ln c and 1/c plots. A plot needs at least 3 points with more than one distinct time.

Sensitivities, standard errors and identifiability. The sensitivity of the observed species to k_j is s_j(t) = k_j·∂c/∂k_j, computed as a central difference of the exact solution with a relative step of 1×10⁻⁴. Over the measurements the model forms M11 = Σ s₁², M22 = Σ s₂² and M12 = Σ s₁·s₂ (the Fisher information for ln k, up to the noise). The error scale is the noise σ for the virtual experiment, or √(SSE/(n - p)) for your data, with p the number of constants. With one constant, the standard error of k1 is k1 × error scale / √M11. With two, det = M11·M22 - M12², and the standard errors are k1 × error scale × √(M22/det) and k2 × error scale × √(M11/det). The correlation of the two estimates is -M12/√(M11·M22). The constants are identifiable when the sums are positive and q = det/(M11·M22) = 1 - ρ² is at least 1×10⁻⁴; below that they cannot be told apart. These are local, linearised standard errors at your constants.

Grid best fit. With k2 held at your value, stage 1 tries 21 values of k1 from one decade below to one decade above your k1, 0.1 decade apart; stage 2 tries 21 values 0.01 decade apart around the best of stage 1 (about 2.3% apart). Each candidate's SSE uses the exact solution. The lowest SSE wins, the lower candidate on a tie.

Other measures. Half-life of A, exact: ln 2/k1 for A -> B and A -> B -> C; ln 2/(k1 + k2) for the parallel scheme; 1/(k1·A0) for 2A -> B; ln((A0 - A_e)/(A0/2 - A_e))/(k1 + k2) for A <-> B when A0/2 is above A_e; and for A + B -> C, when 2·B0 is above A0, ln((2·B0 - A0)/B0)/((B0 - A0)·k1) (1/(k1·A0) when B0 = A0). Otherwise A never halves and the half-life is blank. The half-life from the simulation is read by linear interpolation at the first row where A falls to half its start. For A -> B -> C starting without B, the peak of B comes at t_max = ln(k2/k1)/(k2 - k1) (1/k1 when k1 = k2) and reaches A0·(k1/k2)^(k2/(k2 - k1)) (A0/e when k1 = k2). For A <-> B the equilibrium constant is K = k1/k2, the ratio of B to A at equilibrium.

Calculation sequence

  1. Check the inputs in the order of the list under Errors and warnings.
  2. In a challenge, replace the inputs the challenge fixes with its own values.
  3. Derive the time step, the fastest rate, the step ratio and the longest stable duration.
  4. Compute the exact solution at the 201 frame times and run the 200 Runge-Kutta steps with the stop rule.
  5. Place the measurements, draw the virtual noise or read your table.
  6. Compute the model values, residuals and fit error, the straight-line plots, the sensitivities, standard errors and identifiability, and the grid best fit.
  7. Compute the half-lives, the intermediate peak, the equilibrium values, the end values and the chart bounds.
  8. Set the status and, in a challenge, score it.

Outputs and interpretation

  • Half-life of A (exact) and from the simulation, seconds.
  • Fit error (RMSE), mol/L, and the sum of squares: how far the measurements are from your curve. With noisy data the best possible RMSE is about the noise itself.
  • Standard error of k1 and of k2, the correlation of the estimates and the verdict can the constants be estimated?: how tightly these measurement times pin down the constants. A correlation near 1 or -1 means the measurements cannot separate the two.
  • Rates and R² of the c, ln c and 1/c plots: the straightest plot (R² nearest 1) suggests the order.
  • Best-fit k1 (grid search), its sum of squares, the full list of candidates, and a note: a best fit within one decade of your k1, a tie, a best candidate at the edge of the search, or no dependence on k1.
  • Peak concentration of B and its time, the equilibrium constant and the final ratio B/A of the simulation (which approaches K), and the exact final concentrations of A, B and C.
  • Step ratio, time step, longest stable duration and largest RK4 error (the largest difference between the simulated and exact concentrations, mol/L).
  • Revealed mystery reaction and constants, only when you choose Reveal in free play.
  • Settings used: the reaction, constants and units, starting concentrations, duration, observed species, source, number of measurements, noise and seed in effect, and the model version.
  • Tables: the 201 frames (time, simulated and exact A, B and C, the two sensitivities and the error); the measurements (time, measured, model, residual, and whether each is in the log plots); the straight-line plot values; the grid search candidates; and the scheme rows the glyph draws.

Reading the chart: solid curves are the simulation, dashed curves the exact solution, dots the measurements. Where the solid curve leaves the dashed one, the step is too long for the reaction.

What to take from the lab: a first-order half-life does not depend on the starting concentration, while a second-order one does; the straight-line plot that is really straight names the order; measurements tell most about a constant where the curve is most sensitive to it, and badly placed times cannot separate two constants; and a fast step in a reaction, not the slow one you are watching, sets how short the numerical step must be.

Challenges

Each challenge fixes its own settings (always the virtual experiment, seed 2026) and leaves only some inputs to you. The model scores each one MET (100) or NOT MET (0) and gives a hint while it is not met.

  1. Predict the half-life. Predict the half-life of A for A -> B with k1 = 0.05 per second, within 5%. Met when your prediction is within 5% of the exact half-life.
  2. Find k. Set k1 so the A -> B curve runs through the measurements, within 5% of the hidden rate constant. The value shown is your fit error; met when k1 is within 5% of the hidden constant.
  3. Which order? Find the order of the mystery reaction: choose the reaction and set k1 within 10% of the hidden value. Met when you choose the hidden scheme and k1 is within 10% of its constant.
  4. Measure wisely. With k1 = 0.1 and k2 = 0.05 per second and B measured, place four measurement times so the standard error of k2 is 0.0009 per second or less. Met when the constants are identifiable and the standard error of k2 is at most 0.0009 1/s.
  5. The stiff step. For A -> B -> C with k1 = 0.1 and k2 = 10 per second, find the longest whole-second duration for which RK4's largest error stays below 0.001 mol/L. Met when the run completes, the duration is at least 34 s, and the largest error is below 0.001 mol/L.

Held-back results:

  • Challenge 1, until you predict: every result except the settings used, the time step, the step ratio and the longest stable duration is blank, and only the first frame is shown. Once you enter a number, everything appears and the challenge is scored.
  • Challenges 2 and 3, while not met: the grid best fit, its note and candidates, and the three numeric rate estimates are blank. The data, your curve, the fit error and the straight-line plots stay, because reading them is the method.
  • Challenge 4, while not met: the sensitivity curves are hidden; the standard error of k2 stays as feedback.
  • The mystery reaction and its constants are never revealed while a challenge is selected.

Validation and status logic

The status reads the first match in the list under Errors and warnings. The first nine NOT VALID checks use the values you entered, inside a challenge too; the remaining checks use the values in effect after a challenge has fixed its own. CHECK messages apply inside challenges as well: challenge 5 starts with a run that blows up and its answer reads the coarse-step warning, on purpose. The identifiability verdict and the grid-search notes are result texts, not status messages. A challenge number that is not a whole number from 0 to 5 counts as no challenge.

Assumptions and limitations

  • Six fixed mass-action schemes, at most three species and two constants; isothermal and well mixed; no enzyme kinetics and no temperature dependence.
  • The simulation takes 200 fixed Runge-Kutta steps. A step ratio above 1 is warned, above 2.785 the run can blow up and is warned, and a run that grows past 1000 times the total starting concentration stops.
  • The exact solution is both the reference curve and the fit model, so a coarse simulation never spoils a fit.
  • Virtual measurements are the exact solution plus seeded normal noise; a negative noisy value is kept.
  • The best fit searches one decade either side of your k1 and is only as fine as about 2.3%; candidates outside 0.0001 to 100 are reported as found.
  • Standard errors use the local, linearised approximation at your constants, not at the best fit.
  • A value within about 1×10⁻⁹ (relative) of a threshold, such as a step-ratio limit, the identifiability bound or a challenge band, may fall either side of it.

Restrictions and non-computing states

Under NOT VALID every result and every table entry is blank, except the model version, the challenge result (No challenge selected, or NOT MET with a challenge selected), a score of 0, and the goal and hint of a selected challenge.

A run that stops early shows its rows up to the stop; the exact curves continue past it. With Species B or C observed the straight-line plots and their rates are blank. A half-life is blank when A never halves.

Errors and warnings

The status messages, first match wins:

  • NOT VALID: choose a reaction from the list
  • NOT VALID: each rate constant must be from 0.0001 to 100
  • NOT VALID: each starting concentration must be from 0 to 10 mol/L, with at least one above 0
  • NOT VALID: the duration must be from 0.01 to 10000 seconds
  • NOT VALID: choose the observed species, the measurement source, the mystery reaction, the sampling plan and the reveal setting from their lists
  • NOT VALID: the number of measurements must be a whole number from 3 to 12, and each measurement time from 0 to 10000 seconds
  • NOT VALID: the measurement noise must be from 0 to 1 mol/L, and the seed a whole number from 1 to 2147483646
  • NOT VALID: each row of My data needs both a time from 0 to 10000 seconds and a concentration from -1 to 20 mol/L, or neither
  • NOT VALID: the challenge number must be a whole number from 0 to 5, and the half-life prediction blank or a number from 0 to 10000 seconds
  • NOT VALID: a chosen measurement time is later than the duration: with Chosen times and the virtual experiment.
  • NOT VALID: with My data, enter at least 3 complete rows, each at a time within the duration
  • CHECK: the simulation grew past 1000 times the total starting concentration and stopped; shorten the duration
  • CHECK: the time step is beyond RK4's stability limit for this reaction (step ratio above 2.785), so the simulated curve can zigzag and blow up; shorten the duration
  • CHECK: the time step is coarse for this reaction (step ratio above 1), so the simulated curve can drift from the exact one; compare them
  • OK

The best-fit note can also read CHECK: two candidates fit equally well; the lower one is shown or CHECK: the best candidate is at the edge of the search; set k1 near it and look again; these are notes on the grid search, not the status.

References

This laboratory is an educational model of chemical kinetics under the law of mass action. Six fixed reaction schemes are solved exactly and simulated with the classic fourth-order Runge-Kutta method, whose stability limit sets how long a step can be. The order of a reaction is read from the straightness of plots of concentration, its logarithm and its reciprocal against time. Virtual measurements carry normal noise drawn from the Park-Miller minimal standard generator, and the precision of the fitted rate constants comes from the local, linearised sensitivity of the curve to each constant.

Sources and further reading

  • Integrated rate laws of zero, first and second order, their straight-line plots and their half-lives: OpenStax, Chemistry 2e, section 12.4, Integrated Rate Laws. OpenStax
  • Parallel and consecutive first-order reactions and the rise and fall of an intermediate: J. Gutow, Representative Reaction Mechanisms, Chem 370: Physical Chemistry 1, University of Wisconsin Oshkosh, section 5.3, LibreTexts Chemistry. LibreTexts
  • The classic fourth-order Runge-Kutta method and its four slopes: W. F. Trench, Elementary Differential Equations with Boundary Value Problems, section 3.3, The Runge-Kutta Method, LibreTexts Mathematics. LibreTexts
  • The minimal standard generator: S. K. Park and K. W. Miller, "Random number generators: good ones are hard to find", Communications of the ACM 31(10), 1988, pages 1192-1201. doi:10.1145/63039.63042
  • Standard errors of estimated parameters from the linear approximation of a nonlinear model: D. M. Bates and D. G. Watts, Nonlinear Regression Analysis and Its Applications, John Wiley and Sons, 1988, chapter 2, Nonlinear Regression: Iterative Estimation and Linear Approximations.

No table or text from any of these publications is reproduced, and none of their authors or publishers has reviewed or endorses this laboratory.

This laboratory is for learning. Its results hold only within its stated ranges; its standard errors are local approximations, and real rate measurements also depend on temperature, mixing and instrument error.

Links were current at build time. If one moves, search the document's title rather than reporting a broken link as a defect.

Results are informational and not professional advice. See our Terms of Use. Powered by SpreadsheetWeb · About · Privacy · Terms