A Python package to simulate and measure chaotic dynamical systems.
Project description
LorenzPy
A Python package to simulate and measure chaotic dynamical systems.
⚙️ Installation
To install only the core functionality:
$ pip install lorenzpy
To install with the additional plotting functionality.
This also installs matplotlib. ⚠️ Plotting functionality not in a useful state.
$ pip install lorenzpy[plot]
▶️ Usage
LorenzPy can be used to simulate and measure chaotic dynamical systems. The following example shows how to simulate the famous Lorenz63 system, and measure its largest Lyapunov exponent from the Lorenz63 iterator:
import lorenzpy as lpy
# Initialize the Lorenz63 simulation object with a RK4 time step of dt=0.05
l63_obj = lpy.simulations.Lorenz63(dt=0.05)
# Simulate 5000 steps of the Lorenz63 system:
data = l63_obj.simulate(5000) # -> data.shape = (5000,3)
# Calculate the largest Lyapunov exponent from the l63_obj iterator:
iterator = l63_obj.iterate
lle = lpy.measures.largest_lyapunov_exponent(
iterator_func=iterator,
starting_point=l63_obj.get_default_starting_pnt(),
dt=l63_obj.dt
)
# -> lle = 0.905144329...
The calculated largest Lyapunov exponent of 0.9051... is very close to the literature value of 0.9056[^SprottChaos].
For more examples see the examples folder.
💫 Supported systems
| Name | Type | System Dimension |
|---|---|---|
Lorenz63 |
autonomous dissipative flow | 3 |
Roessler |
autonomous dissipative flow | 3 |
ComplexButterfly |
autonomous dissipative flow | 3 |
Chen |
autonomous dissipative flow | 3 |
ChuaCircuit |
autonomous dissipative flow | 3 |
Thomas |
autonomous dissipative flow | 3 |
WindmiAttractor |
autonomous dissipative flow | 3 |
Rucklidge |
autonomous dissipative flow | 3 |
Halvorsen |
autonomous dissipative flow | 3 |
DoubleScroll |
autonomous dissipative flow | 3 |
Lorenz96 |
autonomous dissipative flow | variable |
DoublePendulum |
conservative flow | 4 |
Logistic |
noninvertible map | 1 |
Henon |
dissipative map | 2 |
SimplestDrivenChaoticFlow |
conservative flow | 2 space + 1 time |
KuramotoSivashinsky |
PDE | variable |
MackeyGlass |
delay differential equation | variable |
📗 Documentation
- The main documentation can be found here: https://duncdennis.github.io/lorenzpy/
- ⚠️: The documentation is not in a useful state.
⚠️ Further notes
- So far the usefulness of this package is very limited. The authors main purpose to creating this package was to learn the full workflow to develop a Python package. More information about the development process can be found in CONTRIBUTING.md.
- The plotting functionality, which can be installed with
pip install lorenzpy[plot]is not tested so far. - See Pynamical for a similar package
[^SprottChaos]: Sprott, Julien Clinton, and Julien C. Sprott. Chaos and time-series analysis. Vol. 69. Oxford: Oxford university press, 2003.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lorenzpy-0.0.2.tar.gz.
File metadata
- Download URL: lorenzpy-0.0.2.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02358a4a8607a4b8a5e14f20c381781c9d36abde0ebe8045fe03baa7ab34adb8
|
|
| MD5 |
b234d1df5264f35aa43a9076621c310c
|
|
| BLAKE2b-256 |
e62c4cee6e25ee2fdae693ba7a633234bb886259b95ba5407ab5a681ab6f8ed4
|
File details
Details for the file lorenzpy-0.0.2-py3-none-any.whl.
File metadata
- Download URL: lorenzpy-0.0.2-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
632a51e937c508e6b0de1a330ccb7ce3dbdd5889ead3c535d5938ae19c099488
|
|
| MD5 |
61c0276efcc621187131525aec57494f
|
|
| BLAKE2b-256 |
4fe9f04f76ab314fdd40c50c440a2e7d54f5ae1fb3818c79b6c348a7c9b34bcd
|