GazzolaLab / PyElastica

Python implementation of Elastica, an open-source software for the simulation of assemblies of slender, one-dimensional structures using Cosserat Rod theory.
https://www.cosseratrods.org
MIT License
235 stars 111 forks source link
cosserat-rod-theory cosserat-rods elastica mechanics python simulation

PyElastica

[![Build_status][badge-travis]][link-travis] [![CI][badge-CI]][link-CI] [![Documentation Status][badge-docs-status]][link-docs-status] [![codecov][badge-codecov]][link-codecov] [![Downloads][badge-pepy-download-count]][link-pepy-download-count] [![DOI][badge-doi]][link-doi] [![Binder][badge-binder]][link-binder] [![Gitter][badge-gitter]][link-gitter]

PyElastica is the python implementation of Elastica: an open-source project for simulating assemblies of slender, one-dimensional structures using Cosserat Rod theory.

gallery

Visit www.cosseratrods.org for more information and learn about Elastica and Cosserat rod theory.

How to Start

PyPI version Documentation Status

PyElastica is compatible with Python 3.10 - 3.11.

$ pip install pyelastica

With this you get a minimal version with very little dependencies.

All options:

Options can be combined e.g.

$ pip install "pyelastica[examples,docs]"

For plotting videos, ffmpeg has to be installed:

$ conda install -c conda-forge ffmpeg

Documentation of PyElastica is available here.

If you want to simulate magnetic Cosserat rods interacting with external magnetic environments you can install the derived package using

$ pip install magneto_pyelastica

Details can be found here.

Citation

We ask that any publications which use Elastica cite as following:

@software{arman_tekinalp_2024_10883271,
  author       = {Arman Tekinalp and
                  Seung Hyun Kim and
                  Yashraj Bhosale and
                  Tejaswin Parthasarathy and
                  Noel Naughton and
                  Ali Albazroun and
                  Rahul Joon and
                  Songyuan Cui and
                  Ilia Nasiriziba and
                  Maximilian Stölzle and
                  Chia-Hsien (Cathy) Shih and
                  Mattia Gazzola},
  title        = {GazzolaLab/PyElastica: v0.3.2},
  month        = mar,
  year         = 2024,
  publisher    = {Zenodo},
  version      = {v0.3.2},
  doi          = {10.5281/zenodo.10883271},
  url          = {https://doi.org/10.5281/zenodo.10883271}
}

References

- Gazzola, Dudte, McCormick, Mahadevan, Forward and inverse problems in the mechanics of soft filaments, Royal Society Open Science, 2018. doi: [10.1098/rsos.171628](https://doi.org/10.1098/rsos.171628) - Zhang, Chan, Parthasarathy, Gazzola, Modeling and simulation of complex dynamic musculoskeletal architectures, Nature Communications, 2019. doi: [10.1038/s41467-019-12759-5](https://doi.org/10.1038/s41467-019-12759-5)

List of publications and submissions

Tutorials

Binder

We have created several Jupyter notebooks and Python scripts to help users get started with PyElastica. The Jupyter notebooks are available on Binder, allowing you to try out some of the tutorials without having to install PyElastica.

We have also included an example script for visualizing PyElastica simulations using POVray. This script is located in the examples folder (examples/Visualization).

Contribution

If you would like to participate, please read our contribution guideline

PyElastica is developed by the Gazzola Lab at the University of Illinois Urbana-Champaign.

Senior Developers ✨

Names arranged alphabetically