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
221 stars 109 forks source link

PyElastica for rigid rods #246

Closed PejmanKheradmand closed 1 year ago

PejmanKheradmand commented 1 year ago

Describe the setup I am currently working on a project that involves the use of Cosserat rod theory and has found your PyElastica software to be a suitable fit for my research. I have found that the software is working fine for soft rods, but, I have encountered an issue while attempting to use the software for a simple application such as the Timoshenko beam. For the high Young's modulus (50Gpa), the model fails to converge. I have tried to rectify the issue by adjusting the damping constant and decreasing the time step but to no avail.

To Reproduce https://github.com/PejmanKheradmand/Timoshenkobeam

Expected behavior I expect the tip of the rod would be deflected similarly to in the theory ( delta = FL^3/(3EI) )

sy-cui commented 1 year ago

@PejmanKheradmand

Hi. Thank you for your interest in PyElastica.

Our software is specifically designed for slender bodies, and the young's modulus and shear modulus we use are usually in the range of MPa or less. In your case where you have a very rigid beam (E = 50GPa), it encounters numerical stability issues (in short, the solution blows up). A general (albeit not necessarily rigorous) rule of thumb is that dt < dl * sqrt(density / max(E, G)).

For your applications, you might consider reducing E (if possible) or dt, although the latter option may take an unreasonable amount of simulation time. If neither seems to be a good solution to you, we recommend considering software that are better suited for bodies with high rigidity. I hope that helps.