API reference¶
This section documents the programmatic entry points — the functions
and objects you call when you drive aeolus1d from Python instead of the
aeolus1d CLI or the desktop GUI. It is the reference for code that looks
like the bundled plot scripts under examples/plots/:
import aeolus1d
case = aeolus1d.load_case("examples/01_single_pipe_sod.toml") # TOML → Case dataclass
pipes, junctions, t_final = aeolus1d.run_case(case) # build + advance
pipe = pipes["tube"]
rho, u, p = pipe.primitives() # (ρ, u, p) over the cells
It is curated, not exhaustive. aeolus1d is a ~100k-line package; this
reference covers the public surface you compose against, not every
internal solver kernel or importer. For the data the API moves around —
every [case] knob, every closure kind, the mechanism / species file
formats — see the hand-written field references, which this section
links to rather than restates:
| Looking for… | Page |
|---|---|
Every [case] / CaseHeader field |
Run / case settings |
| Every closure kind + its TOML fields | Closures — reference table |
| Mechanism + species-DB file formats | Chemistry file formats |
| Which component maps to which model / theory | Component index |
The public-API contract¶
import aeolus1d re-exports five names — the smallest surface that
takes you from a TOML file to an advanced network, plus the check that
pre-flights a case:
| Name | What it does | Defined in |
|---|---|---|
load_case |
Parse + validate a TOML case into a Case dataclass |
aeolus1d.io.parsers |
build_network |
Materialise a Case into Pipe / junction / BC objects |
aeolus1d.io.build |
run_case |
Build and advance a Case to t_end |
aeolus1d.io.case |
validate_case |
Check a Case without building it (a Case assembled in Python, or loaded with validate=False) |
aeolus1d.io.validate |
CaseValidationError |
What validate_case, load_case and build_network raise, every issue listed |
aeolus1d.io.validate |
(Until 2026-11-06 this page said "exactly three names": the last two
were added to aeolus1d.__all__ on 2026-09-07 and the page was not.
tests/unit/test_api_reference_matches_the_code.py now compares this
table with __all__.)
These five are imported lazily (PEP 562 __getattr__) so a bare
import aeolus1d — or aeolus1d --version — stays light and does not
pull in the numba / solver stack. The stack imports the first time you
touch one of the five names. The canonical definitions live in the
modules above; aeolus1d.io.case re-exports build_network and
load_case so from aeolus1d.io.case import build_network, load_case
also works.
The enums a hand-built network names (End.LEFT, Limiter.MINMOD, a
catalyst or EOS kind) are public in aeolus1d.types since 2026-11-24 (roadmap
0h 2.4); they are the same objects as the code's own aeolus1d._types, which
docs and examples no longer import
(tests/unit/test_docs_and_examples_use_public_names.py).
Two ways to advance a network¶
run_case is the one-call path: it builds the network and advances it to
t_end. When you need a handle on the built network before it runs — to
attach a sampler, seed state for a resume, or trace per step — build and
advance in two steps with
build_network +
advance. That two-step form is
what the time-series plot scripts use, because the HDF5 output holds only
the final snapshot:
from aeolus1d.io.case import load_case, build_network, advance
case = load_case("examples/74_twc.toml")
net = build_network(case) # makes the clock a time-dependent case reads
pipe = net.pipes["twc"]
samples = []
def on_step(t): # once per completed step, after the case's controllers
samples.append((t, pipe.primitives()[2][-1])) # (t, outlet pressure)
advance(case, net, on_step=on_step)
advance takes the whole bundle, so nothing the build made can be left
out: the clock, the case's [[controller]] loops (run ahead of your
on_step), the coolant couplings, the standalone walls and the network
arrays. (Until 2026-11-24 this recipe called dispatch_advance with
each of them by hand, made the clock itself, and had to chain the
controllers into on_step; until 2026-11-06 it dropped two of them,
silently.) run_case returns the bundle as well: run.net, beside
run.t_final, and it still unpacks as pipes, junctions, t_final.
advance routes through dispatch_advance, which inspects the case
(solver, rk, and whether the network needs the multi-pipe path —
junctions, species, catalyst, real-gas EOS, coolant or wall-thermal
couplings) and picks the matching driver — explicit, Strang, implicit
(implicit_euler / bdf2 / radau_iia), quasi-steady or multi-rate.
Pass quiet=True to either call to leave out the solver banner; the
AEOLUS_QUIET_SETTINGS=1 variable stays the default.
Continue to Driving the solver for the full
signatures, Runtime objects for the Pipe / network
state you read in on_step, and Closure registry to
enumerate the closure kinds programmatically.