Skip to main content

Simulation and Visualization of Nonlinear Oscillator Dynamics in Python

Project description

Poscidyn

Simulation and Visualization of Nonlinear Oscillator Dynamics in Python

Poscidyn is a Python toolkit based on JAX, designed to streamline and accelerate common workflows in nonlinear oscillator dynamics. It enables the simulation and visualization of (nonlinear) oscillators using experimentally realistic setups, supporting both time- and frequency-domain analyses.

Features include:

  • Built-in models of (nonlinear) oscillators
  • Frequency sweeping (forward and backward)
  • Everything vmappable

Installation

pip install poscidyn[gpu]

Requires Python 3.10 or newer.

Documentation

Have a look at our extensive documentation on how to install, use and extend this package: https://rknetemann.github.io/poscidyn/.

Quick example

import poscidyn
import numpy as np

Q, omega_0, alpha, gamma = np.array([100.0]), np.array([1.00]), np.zeros((1,1,1)), np.zeros((1,1,1,1))
gamma[0,0,0,0] = 2.55
modal_forces = np.array([1.0])

driving_frequency = np.linspace(0.9, 1.3, 501)
driving_amplitude = np.linspace(0.1, 1.0, 10)

MODEL = poscidyn.NonlinearOscillator(Q=Q, alpha=alpha, gamma=gamma, omega_0=omega_0)
EXCITOR = poscidyn.OneToneExcitation(driving_frequency, driving_amplitude, modal_forces)

frequency_sweep = poscidyn.frequency_sweep(
    model = MODEL, excitor=EXCITOR,
) 

Credits where they are due

JAX: a Python library for accelerator-oriented array computation and program transformation, designed for high-performance numerical computing and large-scale machine learning.

Diffrax: JAX-based library providing numerical differential equation solvers.

Equinox: your one-stop JAX library, for everything you need that isn't already in core JAX.

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

poscidyn-0.1.3.tar.gz (37.6 kB view details)

Uploaded Source

Built Distribution

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

poscidyn-0.1.3-py3-none-any.whl (39.1 kB view details)

Uploaded Python 3

File details

Details for the file poscidyn-0.1.3.tar.gz.

File metadata

  • Download URL: poscidyn-0.1.3.tar.gz
  • Upload date:
  • Size: 37.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for poscidyn-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d2c8e572b21dae372d1b71b1c77e1eac8e87d9032402dea38ae45d4ea2d003d6
MD5 fa96b013e37b1228368a263b3145bb36
BLAKE2b-256 b0441baa6d1bb78e46fd0d4a890924edf52cf6892934174fe337d9db9d438b14

See more details on using hashes here.

File details

Details for the file poscidyn-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: poscidyn-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 39.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for poscidyn-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2cfec6588e1509affaf0963508c4da790cc40cfc1602495333142cec23eb1b99
MD5 2722c9159b0ea4f9892cf7b580d85c1a
BLAKE2b-256 f1a1f745bedd754dcafaa33fe75e06e969c2ff3f4490a7f6f117283ca27ff6b6

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