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.90561.
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
-
Sprott, Julien Clinton, and Julien C. Sprott. Chaos and time-series analysis. Vol. 69. Oxford: Oxford university press, 2003. ↩
Metadata
Release files for lorenzpy 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lorenzpy-0.0.2.tar.gz | 19.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lorenzpy-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.6 kB
Release files / lorenzpy-0.0.2.tar.gz
| Download URL | lorenzpy-0.0.2.tar.gz |
|---|---|
| Size | 19.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
02358a4a8607a4b8a5e14f20c381781c9d36abde0ebe8045fe03baa7ab34adb8
|
|
BLAKE2b-256 checksum How to use checksums |
e62c4cee6e25ee2fdae693ba7a633234bb886259b95ba5407ab5a681ab6f8ed4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|
Release files / lorenzpy-0.0.2-py3-none-any.whl
| Download URL | lorenzpy-0.0.2-py3-none-any.whl |
|---|---|
| Size | 18.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
632a51e937c508e6b0de1a330ccb7ce3dbdd5889ead3c535d5938ae19c099488
|
|
BLAKE2b-256 checksum How to use checksums |
4fe9f04f76ab314fdd40c50c440a2e7d54f5ae1fb3818c79b6c348a7c9b34bcd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|