Skip to main content

Dynamic systems analysis

Project description

Caospy

logo

Documentation Status Caospy MIT License Coverage Status https://github.com/leliel12/diseno_sci_sfw

Caospy is a Python package to analyze continuous dynamical systems and chaos.

Its utilities are:

  • Solve systems of ODEs.
  • Eigenvalues, eigenvectors and roots of equations.
  • Classification of fixed points in 1D and 2D.
  • Poincare maps.
  • Plots.

Some well studied systems are available in the library, like Lorenz’s system, the Logistic equation, Duffing’s system and the Rosslers-Chaos systems.

Motivation

Dynamic sisytems are one of the most researched niches of knowledge, their understanding is crucial in order to interact more effectively with our environment. In order to study any dynamical systems to an acceptable level of detail, the classical qualitative analysis fall short and different heuristic methods along with numerical approaches where born to better understand their behavior. Properties like fixed points stability or chaotic behavior, and phenomena like bifurcations are commonly obtained by means of using these so called heuristic methods. Caospy attempts to bring this different tools of analysis together in one Python package, and achieve the unification and regularization of their use in a common developing context, hoping it will provide an easier and more comprehensive analysis of the subject in question.

Requirements

You will need Python 3.9 or later to run Caospy.

Installation

Caospy is available at PyPI. You can install it via the pip command:

$ pip install Caospy

If you'd like to bleeding edge of the code or you want to run the latest version, you can clone this repo and then inside the local directory execute:

$ pip install -e .

Usage

Let's study the damped harmonic oscillator without driving force. It's a second order one dimensional ODE, but we'll reduce it to a system of first-order odes.

import caospy as cp
import matplotlib.pyplot as plt


var = ["x", "y"] # Variables
par = ["k", "c"] # Parameters
fun = ["y", "-c*y-k*x"] # Functions
name = "Damped harmonic oscillator" # System's name
Ode_2d = cp.TwoDim(var, fun, par, name)

t0 = 0 # Initial time
tf = 8 # End time
x0 = [0, 1] # Initial Conditions
par_value = [100, 1] # Parameter values
N = 500 # Number of time steps
sol = Ode_2d.time_evolution(x0, par_value, t0, tf, N)

fig, ax = plt.subplots()
ax = sol.plot_trajectory("t-x") # Plot the solution
ax.set_xlabel("t [s]")
ax.set_ylabel("x [cm]")

You'll get the next figure.

harmonic

For more examples, please refer to the tutorial in Documentation.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Authors

Juan Colman(E-mail: juancolmanot@gmail.com), Sebastián Nicolás Bertolo.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Caospy-0.0.1.tar.gz (18.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

caospy-0.0.1-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

Caospy-0.0.1-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file Caospy-0.0.1.tar.gz.

File metadata

  • Download URL: Caospy-0.0.1.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for Caospy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c75d9fbf6a44c19d3a5a607f55d4b3c08129e79034d2acc8a85ea6964918955a
MD5 66cc514c32c178f2398371e731a5acae
BLAKE2b-256 93c83b8c213861ea22ef9d8cd1c9a2af77621f7eae92616da1971b504fd39332

See more details on using hashes here.

File details

Details for the file caospy-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: caospy-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for caospy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c8f04f11917eb1812130fdb926afb444f0190bbd888fc5c3e958e413aef1550a
MD5 5cf5549bd00d4f520e63798c03548574
BLAKE2b-256 76cd36a17bc5e3f7b058db4f8fb69f2c0b67ebd7d6d367195395a3f007c85090

See more details on using hashes here.

File details

Details for the file Caospy-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: Caospy-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for Caospy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fcca7b4fe4228124365fd09732e6759ffd537047c831130a8edf3872f8546a86
MD5 0a9a8168e8168dfcf570590bdd5849c3
BLAKE2b-256 8265498aee89ad4015f97dff7aa3fe61f83f55b7d17132ee82653bf31d3d7f45

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page