Creating an agglomerate from pack

Asked by Felipe

Hi Everyone,

I'm looking for a way to built an agglomerate from an irregular pack. I have seen all questions in Launchpad (YADE) about this topic and I only found some answers which told me there is a function called the "Omega" class that can use to do it (https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Omega.switchToScene).

So, I have tried to use this function but i don't know exactly how to built the program.

If it's possible, could someone send me one example that I can apply this function? For more detail where i will use this function, following the concept to create on agglomerate like this https://www.dropbox.com/s/9rlbvh0vidlc188/Agglomerate.png?dl=0.

Thank you for everything.

Felipe

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Klaus Thoeni
Solved:
Last query:
Last reply:
Revision history for this message
Klaus Thoeni (klaus.thoeni) said :
#1

Hi, agglomerates are called clumps in Yade. In order to create a packing with agglomerates or clumps you can simply use replaceByClumps [1]. You can find some related examples here [2].

HTH
Klaus

[1] https://yade-dem.org/doc/yade.wrapper.html?highlight=replacebyclump#yade.wrapper.BodyContainer.replaceByClumps
[2] https://github.com/yade/trunk/tree/master/examples/clumps

Revision history for this message
Felipe (felipetthadeu) said :
#2

Hello Klaus,

Thanks for answering my question. However, I know how to create clumps and also it is not exactly what i want.

Maybe, I didn't explain very well.

The main question is: "Is there already some function capable of create another dense pack (pack 2) composed by many pack 1? Considering that the contact parameters between these pack 1 is different from parameters 1 (parameters 2). In other words, pack 2 keeps parameters 1 inside pack 1, but uses parameters 2 in the interaction", following the question before (https://answers.launchpad.net/yade/+question/291194).

Thanks for the moment.

Felipe

Revision history for this message
Best Klaus Thoeni (klaus.thoeni) said :
#3

I don't get it but the functions replaceByClumps or appendClumped will exactly do what the picture is showing, unless you want to perform some sub-simulation on pack 1.

In fact, the example triax-basic-with-clumps.py shows something very similar to what your picture is showing. I guess it's just a matter on how you import your pack1.

You can create pack 1 in one simulation and save the packing as text file and then use it in your other simulation to create pack 2 using appendClumped:

Simulation 1:
# make some simulation to get pack1
...
# export packing as simple text file
export.text('pack1.spheres'))

Simulation 2:
# load pack1 maybe with some loop to create pack 2
...
pack1=ymport.text('pack1.spheres',scale=1.0,shift=(0,0,0),color=[1,0,0],material=someMat) # you can use any material here
clump,clumpspheres=O.bodies.appendClumped(pack1)
...

You could also use the saved file to create a clump template which you can then use with replaceByClumps.

HTH
K

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

Hi Felipe,
maybe the problem is the definition of "agglomerate". Please give us more
information and be as specific as possible. Should it be rigid or elastic?
Should it be cohesive or not? Damagable or elastic?...

Anyway, I doubt there exists such a function. On the other hand, in any
case it is not difficult to write your own, using Klaus's suggestions,
maybe only changing appendClump if clump is not what you want.

Thanks for additional information
cheers
Jan

2016-04-28 4:52 GMT+02:00 Klaus Thoeni <<email address hidden>
>:

> Question #292672 on Yade changed:
> https://answers.launchpad.net/yade/+question/292672
>
> Status: Open => Answered
>
> Klaus Thoeni proposed the following answer:
> I don't get it but the functions replaceByClumps or appendClumped will
> exactly do what the picture is showing, unless you want to perform some
> sub-simulation on pack 1.
>
> In fact, the example triax-basic-with-clumps.py shows something very
> similar to what your picture is showing. I guess it's just a matter on
> how you import your pack1.
>
> You can create pack 1 in one simulation and save the packing as text
> file and then use it in your other simulation to create pack 2 using
> appendClumped:
>
> Simulation 1:
> # make some simulation to get pack1
> ...
> # export packing as simple text file
> export.text('pack1.spheres'))
>
> Simulation 2:
> # load pack1 maybe with some loop to create pack 2
> ...
> pack1=ymport.text('pack1.spheres',scale=1.0,shift=(0,0,0),color=[1,0,0],material=someMat)
> # you can use any material here
> clump,clumpspheres=O.bodies.appendClumped(pack1)
> ...
>
> You could also use the saved file to create a clump template which you
> can then use with replaceByClumps.
>
> HTH
> K
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Felipe (felipetthadeu) said :
#5

Hello Klaus,

I have tested all information wich is your answer following step by step and also the examples inside the github and I understood the correct way to create an agglomerate by clumps.

I only am having some problem with the "replaceByClumps", but this problem can be solved if I study more. Don't worry about that.

thank you for answering me.

Felipe

Revision history for this message
Felipe (felipetthadeu) said :
#6

Thanks Klaus Thoeni, that solved my question.

Revision history for this message
Felipe (felipetthadeu) said :
#8

Hello Jan,

Thanks for answerign me. I was studying about Klaus said and I had concluded that he solved my problem.

By the way, you was right and the next question i will try to say more details about my question.

thanks for your attention.

felipe