Skip to main content

Python package for simulation of Kuramoto model in a fully-filled square lacttice.

Project description

Kurapy

Python package for simulation of Kuramoto model in a fully-filled square lacttice.

Installation

Use the package manager pip to install Kurapy:

pip install kurapy

Usage

Construct a lattice and obtain the coupling matrix:

import kurapy as kp

size = 15
lattice = kp.Lattice(size)
lattice.set_distances('cartesian')
coupling_matrix = kp.coupling.cosine(lattice)

Define the model and run the simulation:

natural_frequencies = np.zeroes(N)
model = kp.Model(natural_frequencies, coupling_matrix)

t = np.arange(200)  # time
phi0 = 2 * np.pi * np.random.rand(N)  # initial condition
phis = model.evolve(t, phi0)

Visualize with an animated plot:

phimat = kp.analyze.shape_matrix(phis)
kp.visualize.lattice_anim(t, phimat)

Refer to examples for more details:

  1. basic.py
  2. curvature.py
  3. gradient.py

Built With

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Project details


Release history Release notifications

Download files

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

Files for kurapy, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size kurapy-0.1.0-py3-none-any.whl (9.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size kurapy-0.1.0.tar.gz (8.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page