random orientation of chained cylinders

Asked by michael on 2016-05-28

I am attempting to model a direct shear box test of sand with randomly distributed fibres. I will be looking at several fibre percentages by weight.

I would like to used chained cylinders to model the fibers however I am not sure the best way to simulate random distribution and orientation within the sample. I am looking at the chained-cylinder-roots.py example and it seems that the additional chains are just copies with the same alignment for small offsets.

do you have any suggestions on how to achieve a more randomised distribution.

is it possible to model a single chained cylinder and add it using makeClumpCloud with a random orientation?

thank you


Question information

English Edit question
Yade Edit question
No assignee Edit question
Last query:
Last reply:
Klaus Thoeni (klaus.thoeni) said : #1

Hi Michael,

ChainedCylinder is deprecated and will be removed in the future. Please use GridConnection instead, see [1].

ChainedCylinder and GridConnections are not clumps hence makeClumpCloud is not directly applicable. A workaround could be the generation of some random GridNodes (or line segments) to create Cylinders/GridConnections.


[1] https://yade-dem.org/doc/yade.gridpfacet.html?highlight=gridpfacet#module-yade.gridpfacet

The initial properties of your fiber distribution should be defined more precisely before any concrete implementation can be conceived, seems to me.
For instance, Klaus talks about generating random points then connecting them. A valid answer in view of the current question, yet maybe not consistent with what your real needs are (lengths, initial curvature,...).

Deepak (deepak-kn1990) said : #3


Here's a small code which generates random fibres in a box(similar to Klaus Thoeni's idea). You can control the number of fibres, and the the number of fibre segments. The file fibgen.f90 is a fortran code which generates the fibres, (it's commented and self explanatory, I guess). The file yy.py is an example with respect to yade. (reading the coordinates, appending to bodies etc.).

To compile : gfortran fibgen.f90, to run ./a.out .. => writes a file called nodes3.dat
To run in yade : yadedaily yy.py

hope this helps!

links :

Deepak (deepak-kn1990) said : #4

I forgot to add, the fibres are generated with respect to gridNode, gridConnection in YADE

Anton Gladky (gladky-anton) said : #5

There is a peace of code which i used to generate a random orientation
of clumps in python-yade-script:

         oriBody = Quaternion(Vector3(1,0,0),random.random()*(pi/2))
         oriBody *= Quaternion(Vector3(0,1,0),random.random()*(pi/2))
         oriBody *= Quaternion(Vector3(0,0,1),random.random()*(pi/2))
         clpId,sphId =

It can also be modified for any other body.



Jacob Sebastian (jacobcfd) said : #6

Hi Deepak,

I am currently trying to simulate the fiber suspension flows very similar to the work you have done in your thesis.
I wish to request you if you can share the scripts you had shared to simulate the random fibers in shear flow.
I could successfully run the simulations with spheres. However, I wish to extend this work to simulating the deforming fibers in flow.

I tried to download the scripts you had shared above, but could not download. It says the files don't exist. Can you please share those scripts again please.


Can you help with this problem?

Provide an answer of your own, or ask michael for more information if necessary.

To post a message you must log in.