clump generation for sphere larger than one given size

Asked by Weimin Song on 2017-03-07

Hey all,

        Two different kinds materials (spheres) were generated by using makecloud. psdSizes and psdCumm are also considered. Now, I want to replace part spheres (radius larger than 0.01) by clumps. I also want to distinguish the two type materials by different color after the clump operation. Anyone could give some help?

        I wrote several lines code, however, which does not satisfy my need. https://www.dropbox.com/s/s7ppf38oq3kbu8f/2.py?dl=0

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2017-03-07
Last reply:
2017-03-08
Christian Jakob (jakob-ifgt) said : #1

hi,

using O.bodies.replaceByClumps() within a loop is not a good idea.

to solve your problem i see two ways:

1.) you generate particles with radius < 0.01 first, then you run replaceByClumps() and generate the rest of the particles afterwards

2.) you can modify replaceByClumps() function in c++ [1], so that you can exclude particles with an excludeList like in updateClumpProperties() [2].

[1] https://github.com/yade/trunk/blob/master/py/wrapper/yadeWrapper.cpp#L210
[2] https://yade-dem.org/doc/yade.wrapper.html?highlight=updateclump#yade.wrapper.BodyContainer.updateClumpProperties

Can you help with this problem?

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

To post a message you must log in.