Journey 02 — Core path (Rössler)
The standard solvsrk.run() call pattern on a chaotic nonlinear ODE, using SolvScout-tuned config when available.
Prerequisites: Journey 01 works. Scenario: Rössler attractor | ndim=3 | nonlinear chaos
Key APIs
solvsrk.run()solvsrk.run_profile()result['ek_steps']result['cvode_steps']
Concepts to internalize
- Nonlinear chaos — no closed-form y(t_end); you care that integration finished with a receipt.
- Tuned vs config_defaults() — stiff/nonlinear plants need SolvScout tokens or bundled presets, not blank defaults.
- Phase counters — ek_steps / cvode_steps show where work happened (diagnostics only).
- knob_source — journey prints whether knobs came from SolvScout or bundled preset.
Important code
The guided tour script wraps this pattern. Copy the production shape into your pipeline:
import solvsrk
import numpy as np
def rossler(t, y):
x, z, w = y
return np.array([-z - w, x + 0.2*z, 0.2 + w*(x - 5.7)])
# Prefer SolvScout token when installed; else bundled tuned preset:
cfg = solvsrk.rossler_config() # or run_profile(token, ...)
result = solvsrk.run(cfg, ndim=3, t0=0.0, t_end=100.0, y0=(1,1,1), rhs_fn=rossler)
print(result['survived'], result['t_reached'], result['y_final'])Act-by-act walkthrough
Act 1 — The problem
The Rössler system is a three-state nonlinear ODE with a strange attractor. It is not stiff in the Robertson sense, but it is a realistic nonlinear trajectory — the kind of model you hand to an integrator when there is no closed form for y(t_end).
Act 2 — The call
solvsrk.run() takes a tuned config, the dimension, the time span, y0, and your rhs(t, y). Knobs come from SolvScout recommend_product() when installed (journey 04); otherwise we use a bundled tuned preset — not raw config_defaults().
| Field | Value | Notes |
|---|---|---|
knob_source | SolvScout tuned (solvsrk, high) |
Act 3 — Read the result
survived tells you it reached t_end; phase counters in the result dict show where the work happened. For chaotic systems you care that the integration finished with a receipt, not that y_final matches a textbook number.
| Field | Value | Notes |
|---|---|---|
survived | True | |
failure_mode | ok | |
t_reached | 100 | |
y_final | [9.65822, -3.53339, 0.813287] | |
total_rhs_evals | 20170 | |
front_phase | steps=0 rhs=0 | |
stiff_phase | steps=18121 rhs=20170 | |
t_handoff | 0 | |
wall_s | 0.05695 | |
ek_steps | 0 | |
cvode_steps | 18121 |
Guided tour output
Verified console capture from 02_core_path.py:
Rössler attractor | ndim=3 | nonlinear chaos
-- Act 1 - The problem --
-> The Rössler system is a three-state nonlinear ODE with a strange attractor. It is not stiff in the Robertson sense, but it is a realistic nonlinear trajectory — the kind of model you hand to an integrator when there is no closed form for y(t_end).
-- Act 2 - The call --
-> solvsrk.run() takes a tuned config, the dimension, the time span, y0, and your rhs(t, y). Knobs come from SolvScout recommend_product() when installed (journey 04); otherwise we use a bundled tuned preset — not raw config_defaults().
knob_source: SolvScout tuned (solvsrk, high)
-- Act 3 - Read the result --
-> survived tells you it reached t_end; phase counters in the result dict show where the work happened. For chaotic systems you care that the integration finished with a receipt, not that y_final matches a textbook number.
survived: True
failure_mode: ok
t_reached: 100
y_final: [9.65822, -3.53339, 0.813287]
total_rhs_evals: 20170
front_phase: steps=0 rhs=0
stiff_phase: steps=18121 rhs=20170
t_handoff: 0
wall_s: 0.05695
ek_steps: 0
cvode_steps: 18121
-- Run complete --
next_journey: 03_stiff_chemistry.pyRun it
cd python
# Guided tour — narrated scenario walkthrough (recommended first run):
python examples/journeys/02_core_path.py
# Production one-liner — same API call you ship:
python examples/journeys/02_core_path.pyWhat comes next
Journey 03 tackles stiff Robertson chemistry with Jacobian and physical constraints.
Navigation
← Journey 01 — First contact · Journey 03 — Stiff chemistry (Robertson) →