Public API#
This page is a task-oriented map of the top-level aquakin API: it points you
to the right entry points for each job. Every name listed here is importable as
aquakin.<name>, and the API reference has the full signatures and
docstrings for all of them.
Tip
The guide pages — Getting started, Reactors, Plant-wide simulation, and Sensitivity & calibration — walk through these APIs with worked examples. Start there; use this page and the API reference to look things up.
Everything not listed here (the AST node types, the compile context, the schema
models, the raw Diffrax solver objects) is internal and should not be imported
from aquakin directly. Reactors are stateless after construction —
solve() takes every variable input as an argument — which is what lets you
jax.vmap a reactor over an ensemble.
Loading and inspecting a model#
To… |
Use |
|---|---|
Load a shipped model by name |
|
Load a model from a YAML file |
|
Reset the model cache |
|
Work with a loaded model |
|
Conditions#
To… |
Use |
|---|---|
Set conditions for a single tank (0-D) |
|
Set spatially varying conditions (PFR/CFD) |
|
Reactors and solutions#
To… |
Use |
|---|---|
Integrate a well-mixed batch (0-D) |
|
Integrate a plug-flow profile (1-D) |
|
Integrate along a Lagrangian particle track |
|
Resolve a biofilm over depth (1-D) |
|
React inside a CFD operator split |
|
Handle pumps / dosing / phase switches |
|
Solutions (BatchSolution, PFRSolution, TrackSolution, BiofilmSolution)
share by-name accessors: C_named, C_named_many, final_named, final,
to_dataframe, to_csv, plot.
Plant-wide simulation#
To… |
Use |
|---|---|
Assemble a flowsheet |
|
Move water between units |
|
Read a plant result |
|
Select a temperature model |
|
Configure aeration |
|
Translate state between models (ASM↔ADM) |
|
Influent characterisation#
To… |
Use |
|---|---|
Split lab measurements into model states |
|
Read a time series from CSV |
|
Sensitivity analysis#
To… |
Use |
|---|---|
Gradient of an output w.r.t. parameters/conditions |
|
Cap-free forward sensitivity through a stiff solve |
|
Global (Sobol-total-bound) sensitivity |
|
Configure differentiation / integration |
|
Guard against silent non-finite gradients |
|
Calibration and identifiability#
To… |
Use |
|---|---|
Point-estimate fit |
|
MAP fit + Laplace posterior |
|
Profile-likelihood identifiability |
|
Configure the fit |
|
Uncertainty propagation and design#
To… |
Use |
|---|---|
Propagate input uncertainty |
|
Compare named scenarios |
|
Optimise a constrained design |
|
Run an ensemble of solves |
|
Model checks: units and conservation#
To… |
Use |
|---|---|
Dimensional consistency of rate expressions |
|
Mass / electron balance of stoichiometry |
|
Composition tables |
|
Benchmark evaluation and reporting#
To… |
Use |
|---|---|
Score BSM1 / BSM2 performance |
|
Effluent quality / operating-cost indices |
|
Sludge and effluent statistics |
|
Greenhouse-gas footprint |
|
Monetised operating cost |
|
Compare KPIs across scenarios |
|
Design and sizing#
To… |
Use |
|---|---|
Size an activated-sludge process |
|
Aeration / blower energy |
|
Pumping / mixing / heating energy |
|
Disinfection sizing |
|
For the exact signatures, return types, and every remaining exported symbol, see the API reference.