In this repository, you can find the source code used to numerically solve the mathematical problem of a rod coiling about a straight, rigid constraint. The model and the results of the numerical simulations are contained in this paper [1].
The code is written in Python 3 and tested with version 3.8. The following additional libraries are required, in the parentheses we indicate the version used in the simulations reported in the paper:
- FEniCS (version 2019.2.0)
- Numpy (version 1.17.4)
- Scipy (version 1.3.3)
The repository is organized as follows:
continuation.py
contains an implementation of the parameter continuation algorithm; it is part of a bigger library which is currently under development and it is reported here in a simplified version to allow the reproducibility of the results reported in [1].problems.py
contains some classes implementing the nonlinear problem of the coiling rod described in the paper for several control parameters and boundary conditions. In particular:CoilingU2sFree
implements the problem where the natural curvature is the control parameter and we apply the boundary conditions corresponding to the free ends case (see [1]).CoilingFFree
implements the problem where the force is the control parameter and we apply the boundary conditions corresponding to the free ends case (see [1]).CoilingU2sFree
implements the problem where the natural curvature is the control parameter and we apply the boundary conditions corresponding to the pinned ends case (see [1]).CoilingFFree
implements the problem where the force is the control parameter and we apply the boundary conditions corresponding to the pinned ends case (see [1]).
example_free.py
solves the problems implemented in the classesCoilingU2sFree
andCoilingFFree
, looking for solutions corresponding to helical configurations.example_pinned.py
solves the problems implemented in the classesCoilingU2sPinned
andCoilingFPinned
, looking for solutions exhibiting a single perversion.
If you find this code useful for your work, please cite [1]
The source code contained in this repository is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
[1] D. Riccobelli, G. Noselli, A. DeSimone (2020). Rods coiling about a rigid constraint: Helices and perversions. Proceedings of the Royal Society A: Mathematical, Physical and Engineering, 477(2246), 20200817..