fast_lyapunov_max#
- gala.dynamics.nonlinear.fast_lyapunov_max(w0, hamiltonian, dt, n_steps, d0=1e-05, n_steps_per_pullback=10, noffset_orbits=2, t1=0.0, atol=1e-10, rtol=1e-10, nmax=0, return_orbit=True)[source]#
Compute the maximum Lyapunov exponent using a fast C-implemented method.
This function estimates the maximum Lyapunov exponent by integrating the orbit along with several nearby offset orbits and tracking their separation over time. It uses the DOPRI853 integrator for high accuracy.
- Parameters:
- w0
PhaseSpacePositionor array_like Initial conditions for the primary orbit.
- hamiltonian
Hamiltonian The Hamiltonian system to integrate in. Must contain a C-implemented potential and frame.
- dt
float Integration timestep.
- n_steps
int Number of integration steps to run.
- d0
float, optional Initial separation between the primary orbit and offset orbits. Default is 1e-5.
- n_steps_per_pullback
int, optional Number of integration steps between each renormalization of the offset vectors. Default is 10.
- noffset_orbits
int, optional Number of offset orbits to use. Default is 2.
- t1
float, optional Initial time. Default is 0.0.
- atol
float, optional Absolute tolerance for the integrator. Default is 1e-10.
- rtol
float, optional Relative tolerance for the integrator. Default is 1e-10.
- nmax
int, optional Maximum number of function evaluations. Default is 0 (no limit).
- return_orbitbool, optional
Whether to return the integrated orbit along with the Lyapunov exponent. Default is True.
- w0
- Returns:
- Raises:
TypeErrorIf the Hamiltonian does not contain C-implemented components.
ValueErrorIf trying to compute Lyapunov exponents for multiple orbits simultaneously.
Notes
The Lyapunov exponent quantifies the rate of exponential divergence of nearby trajectories in phase space. Positive values indicate chaotic motion, while zero or negative values suggest regular motion.
This implementation is optimized for speed and uses C code with the DOPRI853 adaptive Runge-Kutta integrator.