Cesar L. Pastrana, 2023 (c)
This software was used in the manuscript "Mechanics and wrinkling patterns of pressurized bent tubes" by Pastrana C.L, Qiu L., Hutchinson J.W., Amir A. and Gerland U. arXiv 2024.
The surface is described using a discrete bead and spring model. The total energy of the system is given by
where the first sum runs over all pairs of connected notes
The external potential is
where the summation runs over all the triangles of the right (or left) lid and
The term
where
The approach described resembles the action of virtual hands to induce bending. The force exerted on the lids is adjusted with the constant
Each step, pressurization and bending, is followed by energy minimization. A custom non-linear conjugate gradient algorithm is used to find the minimal energy configuration.
A Makefile is provided in the brazier
folder. To compile the code, simply execute:
make parallel
This will generate the compiled code brazier
in the bin
folder. The parallel
tag activates the OpenMP compatible compilation.
The simulation is launched by simply executing ./brazier
in the brazier/bin
folder. The number of nodes to use in the parallel computations can be configured by exporting the variable OMP_NUM_THREADS
, as export OMP_NUM_THREADS = num threads to use
.
Pressurisation proceeds in a step-wise fashion from
The program requires as input the following files:
-
init_coords.dat
: Array of$N\times 3$ with the$N$ vertices coordinates defining the surface in the relax configuration. The units of the input coordiantes coordinates are nm. -
mesh.dat
: Array of$T\times 3$ with the$T$ triangles defining the connectivity of the triangulated surface. -
params.conf
: This file contains the simulation parameters to use. The meaning of each parameter is indicated in commented blocks in the file. The user can adjust the parameters$K_\tau$ and$K_{CM}$ , as well as the$N_\theta$ and$\theta_{max}$
A cylinder with lids having the approapiate configuration to be interpreted by the simulation code, can be generated with the included Python code included in the folder gencylinder
. The code is executed as
python3 rodgen radius length spacing type_of_cylinder
where radius and length are the target radius and length, and spacing is the typical bond length of the sytsem, i.e., circumf
or long
depending on the desired orientation of the mesh. In the article, we mostly used circumferentially aligned cylinders. The execution of the script generates the files init_coords.dat
and mesh.dat
located in the outfiles
folder. These files contain the position of the vertices and the ensuing triangulation and are ready to be used with brazier
. A log file is also generated as a summary of the properties of the generated mesh.
The codes to generate the cylinders with lids are dependent on Python 3 and on the packages numpy and sys. The generation of the mesh relies on the Advancing Front Surface Reconstruction algorithm from the CGAL library (see the meshgen repository).
The following output files are generated after execution of brazier
:
press/X_press.dat
: Coordinates for each step of pressurization.brazier/X_brazier.dat
: Coordinates for each step of bending at the given pressure. These are the main files to analyse.summary/minim_coords_press.dat
: Coordinate at the target pressure prior to bending.summary/minim_coords_press.dat
: Coordinate at the target pressure at the end of the bending routine.summary/pressures.dat
: Pressures in each step.summary/bent_angles.dat
: Imposed bent angles for each step.summary/output.dat
: Summary of mechanical, geometrical, and simulation parameters employed.lids/*.dat
: The files in this folder indicate the edges, triangles, and vertices that belong to the right or left lid of the tube.
For any question, comment or problem, please write me to ceslopast_AT_gmail_com