I have recently encountered a possible bug regarding the implementation of espressomd.shapes.cylinder that I would like to share with you.
I tried to run some Lattice-Boltzmann simulations to study the flow around a cylinder and I realized that, unless the cylinder axis is aligned to one of the three axis, the resulting shape is not a cylinder anymore. If one tries to implement and analyze a tilted cylinder, first he will notice that the radius increases when moving along the axis towards the two ends:
Furthermore, investigating slices of this shape, it is easy to see that, while the layers around the center look like a discus, the ones near the two ends are actually rings thus generating two holes in the cylinder:
The solution to this problem that I came up with was to add small cylinders (length=1) on top of each other to obtain the cylinder with the desired parameters:
I have also attached the python source codes that were used to generate the figures for the custom method (source_custom_cylinder.txt) and for the default espresso cylinder (espresso_cylinder.txt).
I have recently encountered a possible bug regarding the implementation of espressomd.shapes.cylinder that I would like to share with you.
I tried to run some Lattice-Boltzmann simulations to study the flow around a cylinder and I realized that, unless the cylinder axis is aligned to one of the three axis, the resulting shape is not a cylinder anymore. If one tries to implement and analyze a tilted cylinder, first he will notice that the radius increases when moving along the axis towards the two ends:![fig1_espresso_cylinder](https://user-images.githubusercontent.com/36921896/36796303-274c2500-1c9d-11e8-9656-40bba4d6e122.png)
Furthermore, investigating slices of this shape, it is easy to see that, while the layers around the center look like a discus, the ones near the two ends are actually rings thus generating two holes in the cylinder:![fig2_espresso_cylinder](https://user-images.githubusercontent.com/36921896/36796383-5873212e-1c9d-11e8-96ca-a7eec12e020c.png)
The solution to this problem that I came up with was to add small cylinders (length=1) on top of each other to obtain the cylinder with the desired parameters:![fig3_custom_cylinder](https://user-images.githubusercontent.com/36921896/36796412-69aa0c8c-1c9d-11e8-8a2b-f7b921a62482.png)
I have also attached the python source codes that were used to generate the figures for the custom method (source_custom_cylinder.txt) and for the default espresso cylinder (espresso_cylinder.txt).