# cylindrical particles packing

Hi all, I'm new for YADE. And I'm really confused about that how can I create the cylindrical particles in packing process.

SO, my question will be the following:

1) how can I create abundant cylinder particles. I think I do not fully understand the cylinder code below:

cylinder((0, 0, 0), (10, 0, 0), radius=1, nodesIds=nodesIds, cylIds=cylIds, fixed=True, color=[1, 0, 0], intMaterial='cMat', extMaterial='fMat')

What the " (0,0,0) & (10,0,0)" part means in this line?

what the "fixed=True" means ?

and the above code seems that we only create one cylindrical particle... So, how can I create more than one cylindrical particles?

2) After I create the abundant cylindrical particles, can I use some method to create them in pack like sphere particles? i.e. makeCloud()

3) And if I would like to create only one layer cylindrical particles, what can I do?

but replace the layer of sphere particles with one layer of cylindrical particles...

4) The last question is: can we create the real disk shape particles in YADE?

## Question information

Language:
English Edit question
Status:
For:
Assignee:
No assignee Edit question
Last query:

## This question was reopened

• by enki
 Revision history for this message Jan Stránský (honzik) said on 2022-05-06: #1

Hello,

welcome :-)

Specifically:

> abundant cylinder particles

what does "abundant" mean in this context?

> 4) ... can we create the real disk shape particles in YADE?

What does "real disk" exactly mean?
Zero thickness "2D" "filled circle", like zero-thickness coin?

-----------------------

> What the " (0,0,0) & (10,0,0)" part means in this line?

See documentation [2].
(0,0,0) is "begin" argument
(10,0,0) is "end" argument

> what the "fixed=True" means ?

See documentation [2]: "See utils.sphere’s documentation for meaning of other parameters."
So see [3], where Fixed reads "generate the body with all DOFs blocked".

> and the above code seems that we only create one cylindrical particle... So, how can I create more than one cylindrical particles?

simply call the same "line" multiple times (of course with appropriate arguments, like different coordinates).

> 2) After I create the abundant cylindrical particles, can I use some method to create them in pack like sphere particles? i.e. makeCloud()

Yes, e.g. you can use makeCloud and then use the data (centers) to create the cylinders.

> 3) And if I would like to create only one layer cylindrical particles, what can I do?

Depending on actual needs:
- using 2D make cloud
- gravity deposition
- 3D cloud/packing + crop
- ...

Cheers
Jan

 Revision history for this message enki (kikiyu) said on 2022-05-06: #2

Thanks Jan,

I think I have already understand the cylinder code line parameters.

1) abundant cylinder particles

what does "abundant" mean in this context?

>> I want create a mass of random cylindrical particles like what pack step do.

2) can we create the real disk shape particles in YADE?

What does "real disk" exactly mean?
Zero thickness "2D" "filled circle", like zero-thickness coin?

>> my real disk means: flat top and bottom side cylinder, I think it will like a coin with a small thickness like that

3) simply call the same "line" multiple times (of course with appropriate arguments, like different coordinates).

>> Yes, we can rewrite the new cylinder creation line to get new cylinder particle, however, what if I want 10000 cylinder particle in my test? It's obvious that the only cylinder code line is not enough.

4) Depending on actual needs:
- using 2D make cloud
- gravity deposition
- 3D cloud/packing + crop

>> What do you mean for the "2D make cloud"?

 Revision history for this message Jan Stránský (honzik) said on 2022-05-06: #3

Hello,

>> can we create the real disk shape particles in YADE?
> my real disk means: flat top and bottom side cylinder, I think it will like a coin with a small thickness like that

It is currently not possible to use proper cylinders.
You can approximate it by polyhedrons or clumped particles or potential particles/blocks.
You can implement the functionality.
Depends on your needs, resources, ...

>> 3) simply call the same "line" multiple times (of course with appropriate arguments, like different coordinates).
> Yes, we can rewrite the new cylinder creation line to get new cylinder particle, however, what if I want 10000 cylinder particle in my test? It's obvious that the only cylinder code line is not enough.

Actually "the only cylinder code line" can well be enough "if you want 10000 cylinder particle in your test".
Rewriting the line is one option.
Using programming concepts like loops [7,8] is another options.

> What do you mean for the "2D make cloud"?

Using the approach SpherePack -> cylinders, but using 2D make cloud, i.e. making one dimension of the makeCloud zero, therefore all the centers are in one plane inside the defined rectangle.

Cheers
Jan

 Revision history for this message enki (kikiyu) said on 2022-05-07: #4

Thanks Jan,

I've solved cylinder particles problem.

 Revision history for this message enki (kikiyu) said on 2022-05-07: #5

Thanks Jan Stránský, that solved my question.

 Revision history for this message Jérôme Duriez (jduriez) said on 2022-05-09: #6

Regarding

>>> can we create the real disk shape particles in YADE?
>> my real disk means: flat top and bottom side cylinder, I think it will like a coin with a small thickness like that

>It is currently not possible to use proper cylinders.
>You can approximate it by polyhedrons or clumped particles or potential particles/blocks.

Note also the LevelSet approach :

Thickness will be equal to

O.bodies[ls].shape.lsGrid.spacing

 Revision history for this message enki (kikiyu) said on 2022-05-09: #7

Thanks Jerome,

I'm real new for YADE, so if I've made some mistake or misunderstanding for answer, feel free to point out and let me know.

1) You can approximate it by polyhedrons or clumped particles or potential particles/blocks.

>> I have understood the impossible for real disk shape in YADE. I tried to create cylinder particles with loop by cylinder() right now in my case.

>> For the clumped particles, I do not think it can shape the cylindrical particle like what I want like coin as I descriped above, is that right? If you have some detailed example, feel free to let me know.

>> And for polyhedrons, I'm not familiar with the concept, nor did I find any parameter descriptions in the YADE documentation...

2) I searched the YADE documentation for the LevelSet method and I'm very confused about the main purpose of this method "level set description of particle shapes based on discrete distance fields and surface nodes". It looks like we can create a level set to store particle positions...is that right?

If you can give me more detailed examples, that will be helpful for my understanding. Sorry for my lack of YADE and Python background

 Revision history for this message Jérôme Duriez (jduriez) said on 2022-05-10 #8

2) In the Doc quotation of [*], "level set description of particle shapes based on discrete distance fields and surface nodes", do not forget about the rest of the quotation, i.e. references to [Duriez2021a] [Duriez2021b] in https://yade-dem.org/doc/publications.html. In particular [Duriez2021b] for practical advices.

The level set we speak about here is the 0-level set of the distance function to a Body surface = the surface of that Body. It is the way we (somewhat indirectly) describe Shape in that approach, and you have to think there are as many level set as Bodies.

 Revision history for this message enki (kikiyu) said on 2022-05-11: #9

Thanks Jerome,

The level set can be used to described the body surface, and then the new or non-spherical particles can be created by this step.

In YADE documentation, the utils.phiIniPy() can be used to describe the superellipsoid, right?

And if I want to use LS-DEM to create the shape I want, the PhiIni parameter has to be a mix of c++ and python code, right? Or we can use pure python approach...

 Revision history for this message Jérôme Duriez (jduriez) said on 2022-05-16: #10

Which shape would you like to describe in the end ? A cylinder or a superellipsoid, or sthg else ?

For a cylinder,
should do the trick, providing you a disk in (x,y) space (while being obviously z-invariant)

For a superllipsoid
O.bodies.append(levelSetBody('superellipsoid',extents = (1,2,3),epsilons = (0.5,1.5)))
will work.

In both cases, you do not need to use phiIniPy (which is to reserve for cases not already handled by the shape attribute of levelSetBody)

PS: in the levelSetBody function, spacing and nSurfNodes are very important parameters of LS shape description in YADE and are omitted in the above only for simplicty, assuming default values are fine