Torus¶
Systems / ODEs / Oscillatory systems
Quasiperiodic motion on a 2-torus — two incommensurate frequencies, no chaos.
Start here¶
import tsdynamics as ts
system = ts.systems.Torus()
traj = system.run(final_time=20.0, dt=0.01, seed=0)
ts.plot(traj)
traj.t contains the sample times and traj.y the state array; system.info shows the defaults. In a notebook the last line displays the plot. In a Python script, call .show() on it to open a window, or .save("trajectory.svg") to export it.
With an adaptive ODE solver, dt sets the output spacing; rtol and atol control local integration error. For a fixed-step solver, reduce dt to check numerical convergence.
This finite simulation illustrates one initial condition and view. The diagnostics below report their own inputs and observation windows.
Dynamics at the default parameters¶
Lyapunov exponents measure separation rates along an orbit. The Kaplan–Yorke dimension is derived from those rates, not a direct geometric measurement. Finite runs depend on the initial condition, transient and observation window; a value near zero needs a convergence check.
per time unit
Method and evidence
Benettin QR tangent dynamics
Finite-time estimate, not a convergence certificate. Response directions only; the forcing phase is not an extra state.
Settings
{
"backend": "jit",
"k": 3,
"final_time": 400.0,
"transient": 100.0,
"dt": 0.1,
"ic": [
0.018289586587647434,
0.09198412844246005,
-0.09932369471443253
],
"rtol": 1e-09,
"atol": 1e-12,
"solver": "rk45"
}
Preparation
{
"seed": 616917064,
"ic_policy": "declared/in-basin start, else seeded small ball"
}
Estimator runtime in the recorded environment: 0.0268 s.
constant in the state
Recorded parameters and software
{
"parameters": {
"a": 0.5,
"n": 15.3,
"r": 1
},
"parameter_expressions": {},
"state_dimension": 3,
"explicit_time": true,
"library_version": "6.0.3",
"python": "3.14.8",
"numpy": "2.4.4",
"scipy": "1.17.1",
"protocol_version": 1
}Definition¶
Parameters¶
| Symbol | Default | Role |
|---|---|---|
a |
0.5 |
minor radius (tube radius) |
n |
15.3 |
tube windings per revolution (irrational = quasiperiodic) |
r |
1 |
major radius (centre to tube centre) |
State variables: x, y, z
Explore further¶
- Lyapunov estimates — measure response separation rates. An attractor dimension needs the forcing phase in an autonomous extension.
- Stroboscopic and Poincaré maps — study recurring responses to periodic forcing; freezing time does not define an autonomous equilibrium problem.
- Plotting and export — choose components, style a figure, or save it for a paper.
- Find a compatible analysis with
ts.analysis.find(system)orts.analysis.find(traj).
Reference¶
Strogatz (1994), Nonlinear Dynamics and Chaos