Batch Reactor (marimo notebook)
A self-contained walkthrough of Sobol global sensitivity analysis on a batch reactor running a first-order liquid-phase reaction
The notebook source lives at examples/batch_reactor_gsa.py. Run it interactively with uv run marimo edit examples/batch_reactor_gsa.py, or read the rendered output below.
What this example covers
- A three-input Sobol problem (
, , ) defined with gsax.Problem.from_dict(...)and uniform marginals. - A closed-form batch reactor start-up trajectory used as the model — the kind of cheap surrogate you would plug a fitted mechanistic predictor into.
- A single
gsax.analyze(..., num_resamples=200, key=...)call to obtain, , along with bootstrap 95 % confidence intervals. - Three plots that read the indices off: steady-state bar chart with CI error bars, time-resolved
and with shaded bootstrap envelopes, and a pairwise heatmap.
See also
- Bootstrap Confidence Intervals for the bare-API version of the same bootstrap workflow on the Ishigami benchmark.
- Multi-Output & Time-Series for the shape rules used here when the output is
(N, T, K).