Skip to content

Commit

Permalink
Added supported systems to readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
DuncDennis committed Oct 18, 2023
1 parent 0cf0c67 commit 15e9220
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,22 @@ lle = lpy.measures.largest_lyapunov_exponent(
The calculated largest Lyapunov exponent of *0.9051...* is very close to the literature
value of *0.9056*[^SprottChaos].

## 💫 Supported systems


| Name | Type | System Dimension |
|:---------------------------:|:---------------------------:|:----------------:|
| `Lorenz63` | autonomous dissipative flow | 3 |
| `Lorenz96` | autonomous dissipative flow | variable |
| `Logistic` | noninvertible map | 1 |
| `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:
## ⚠️ 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.
Expand Down
21 changes: 15 additions & 6 deletions src/lorenzpy/simulations/autonomous_flows.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Autonomous flows."""
from typing import Callable

import numpy as np

from .base import _BaseSimFlow
Expand All @@ -9,13 +11,16 @@ class Lorenz63(_BaseSimFlow):
This function is able to simulate the chaotic dynamical system originally
introduced by Lorenz.
Attributes:
sigma: Sigma parameter.
rho: rho parameter.
"""

def __init__(self, sigma=10.0, rho=28.0, beta=8 / 3, dt=0.1, solver="rk4"):
def __init__(
self,
sigma: float = 10.0,
rho: float = 28.0,
beta: float = 8 / 3,
dt: float = 0.1,
solver: str | str | Callable[[Callable, float, np.ndarray], np.ndarray] = "rk4",
):
"""Initialize the Lorenz63 simulation object.
Args:
Expand Down Expand Up @@ -49,7 +54,11 @@ class Lorenz96(_BaseSimFlow):
"""Simulate the n-dimensional Lorenz 96 model."""

def __init__(
self, sys_dim: int = 30, force: float = 8.0, dt: float = 0.05, solver="rk4"
self,
sys_dim: int = 30,
force: float = 8.0,
dt: float = 0.05,
solver: str | str | Callable[[Callable, float, np.ndarray], np.ndarray] = "rk4",
) -> None:
"""Initialize the Lorenz96 simulation object.
Expand Down

0 comments on commit 15e9220

Please sign in to comment.