Fast Simulation of Nonlinear Oscillator Dynamics in Python
Poscidyn (Python oscillator dynamics) is a JAX-based toolkit for batched nonlinear time responses and frequency sweeps. Its supported public workflow uses a solver instance: build the model and excitation once, then call solver.time_response(...) or solver.frequency_sweep(...).
Features include:
- Time-response simulation
- Batched forward and backward synthetic frequency sweeps
- Nonlinear modal oscillators with quadratic and cubic stiffness
- JAX-oriented batching through
vmap
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 jax.numpy as jnp
import poscidyn
oscillator = poscidyn.NonlinearOscillator(
omega_0=jnp.array([1.0]),
Q=jnp.array([80.0]),
a=jnp.zeros((1, 1, 1)),
b=jnp.array([[[[0.2]]]]),
)
excitation = poscidyn.DirectHarmonicExcitation(f_d=jnp.array([0.002]))
solver = poscidyn.TimeIntegration(
oscillator=oscillator,
excitation=excitation,
response_measure=poscidyn.Demodulation(),
multistart=poscidyn.LinearResponse(n_init_cond=8),
n_time_steps=64,
)
result = solver.frequency_sweep(jnp.linspace(0.8, 1.2, 100))
The documentation provides an executable first sweep, a time-response quickstart, numerical guidance, and a clear distinction between supported features and research directions.
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.
Metadata
Release files for poscidyn 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| poscidyn-0.2.1.tar.gz | 39.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| poscidyn-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 82.0 kB
Release files / poscidyn-0.2.1.tar.gz
| Download URL | poscidyn-0.2.1.tar.gz |
|---|---|
| Size | 39.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8dcf720d8ed5c1a2b15846f9f212d2acd1bb6de68819018b33c51cefdb43f3d
|
|
BLAKE2b-256 checksum How to use checksums |
83785f9494e7e6ee83697a9f5cc75cf377c0a87c2ffe36dab47bd1282921bc7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.11
|
Release files / poscidyn-0.2.1-py3-none-any.whl
| Download URL | poscidyn-0.2.1-py3-none-any.whl |
|---|---|
| Size | 42.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d8e5012eab9c47696373d901c457741328ed479b86a333e4836f7db94c933318
|
|
BLAKE2b-256 checksum How to use checksums |
e7132ac5326e1ef0ca541976a58e96e4b3365fd4e2bcdf6218939b30c3c66df0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.11
|