Shaped particles sample

Asked by Abimael

Hello everybody. I am new to yade and I desire to create a sample formed by shaped particles. For this, I have created a particle made by spheres and I have exported it using export.textExt. I was figuring if it is possible to import this particle in another script as many times as possible in many different configurations by translation and rotation of this particle. I know that if I use bodiesHandling.spheresModify() I can copy the particle rotating and translating it, but I was looking for something more fast, randomic and automatic. Maybe a factory... I don't know. Any ideas?
Thanks a lot.

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jérôme Duriez (jduriez) said :
#1

Hi,

You may give a look to this previous question:
https://answers.launchpad.net/yade/+question/403901
It may be related.

Revision history for this message
Abimael (bimaste) said :
#2

Hi Jerome,
I am not sure if I correctly understood but in the previous question agglomerates representing particles were created one by one in the simulation.
What I am trying to do in fact is similar but I am trying to use some process where I don't have to put every single particle of the simulation but instead of it the particles would be added randomly following some criteria, function or maybe factory.
I think that if the particles are created as proposed in the other question or imported as I am trying to do don't matters because in both cases the particles are created one by one.

Revision history for this message
Abimael (bimaste) said :
#3

Hello everybody.

I am using this command for what I am trying to do:

for aux in range (0,1000):
    prt = O.bodies.append(bodiesHandling.spheresModify(part, shift = Vector3(random.choice(x),random.choice(y),random.choice(z)), orientation = Quaternion((random.choice(posi),random.choice(posi),random.choice(posi)),random.choice(orientations)), scale = random.choice(scl), copy = True))
    aux = aux + 1

The arguments are chosen randomly in a list. The range in the for limits the number of particles.
The problem of this alternative is that I can't avoid that particles are created one above another and the particles are disappearing during the simulation.

Any suggestions?

Revision history for this message
Jan Stránský (honzik) said :
#4

Hello,
of course if you place the particles completely randomly, they can overlap.
An option is to run SpherePack.makeCloud in advance, generating randomly
non-overlaping spheres (of a size to contain each shape). The shapes are
then placed to the centers of the spheres (the spheres are then not used
any more).
You can run some kind of compression if you need denser packing.
Cheers
Jan

Revision history for this message
Bettina Suhr (bettina-suhr) said :
#5

Hi Abimael,

when I want to generate samples made of clumps I use „makeClumpCloud“.
You can find an example script at
trunk/examples/test/clumpPack.py
This avoids problems with overlapping particles. Maybe it fits to what you are looking for.

Best regards,
Bettina

Can you help with this problem?

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

To post a message you must log in.