how to use clump to make a desired shape

Asked by lip on 2019-08-22

hello
    i want to use clump to cerat a tetrahedron,can you give me some advice?

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2019-08-23
Last reply:
2019-08-26
lip (mr.xie) said : #1

by the way, when the clump is created, i want to replace sphere which created by function makeCloud() by the clump, as far as i know, clump is a tuple object, so it do not have positon attribute, which make it can not replace the sphere according to the positon of sphere, can you give me some advice to help me solve that problem, lookforward for your reply

lip (mr.xie) said : #2

Comment to my first question:
      sorry for my misrepresentation, what i mean is not use clump to create a tetrahedron, Instead, what i want is create a clump in the shape of a tetrahedron

Jan Stránský (honzik) said : #3

> can you give me some advice?
> can you give me some advice to help me solve that problem

sure:
- spend a few more seconds / minutes to formulate the question and comments
- write understandable description
   - did you mean clump of spheres? whose shape is approximatelly a tetrahedron?
- write understandably (e.g. read what you have written before posting):
   - cerat ... create?
   - positon ... position?
   - split very long sentence (like your #1) into logical pieces, preferably using a period symbol for that [1].
   - use question marks for questions
- write what you have tried, why you did not try anything if it is the case, what and why did not work ...

I can **guess** what you probably wanted, but since it is just guess, I do not want to spent time on the solution

> which make it can not replace the sphere according to the positon of sphere

here I cannot even guess ...

> i want to replace sphere which created by function makeCloud() by the clump

sphere? spheres?
which WERE created?
makeCloud() is what? SpherePack.makeCloud()? (with MWE [2] there would not be a need to ask)
a clump is composed of its elements, so basically you cannot replace the elements by something which should contain them..

> as far as i know, clump is a tuple object, so it do not have positon attribute,

clump may be a Shape instance [3], or a body having Clump shape is usually referred as a clump.
Definitely it is not a tuple

cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask
[2] https://en.wikipedia.org/wiki/Full_stop
[3] https://yade-dev.gitlab.io/trunk/yade.wrapper.html#yade.wrapper.Clump

lip (mr.xie) said : #4

dear Jan:
     sorry for wasting your time because of my unclear expression.
     i am glad to say that what you guess is exactly what i want to ask.
     i have two questions:
     question 1:
     how to use clump of spheres to creat a clump of tetrahedral shapes
     question 2:
     once the clump of tetrahedral shapes is cerated, how can i replace spheres by it,the spheres are cerated by sp.makeCloud(),

lip (mr.xie) said : #5

by the way, the clump means a clump body

Jan Stránský (honzik) said : #6

> sorry for wasting your time because of my unclear expression.

there is no wasting, because I did not even try to help you :-)

1)
create / import particles occupying desired shape and call e.g. O.bodies.appendClumped.
The specific steps depends on your situation, which was not described much.. like what spheres you want.
uniform vs. PSD?
regular vs. random packing?
create new spheres for it or use existing spheres from larger assemblies?
...

2) it is really not clear what you want to do. A clump is formed by spheres, you cannot replace them (or, it would technically replace the clump itself).

cheers
Jan

lip (mr.xie) said : #7

> uniform vs. PSD?
 i want to use PSD

> create new spheres for it or use existing spheres from larger assemblies?
i want to create new spheres for it

> it is really not clear what you want to do.
what i want to do is that:
first,create a clump such as :
     clump1=O.bodies.appendClumped([\
     sphere([0,0,1], material=Mat, radius=0.5),\
     sphere([0.2,0,1], material=Mat, radius=0.5)\
    ])
second,create a binary sphere particles system contained both big and small particles,like that:
      sp=pack.SpherePack()
     sp.makeCloud((0.2,0.2,2),(2.4,2.4,18),psdSizes=[0.1,0.1,0.4,0.4],psdCumm=(0.0,0.8,0.8,1),seed=1,porosity=1)
third, replace the big sphere particles by cerated clump,like that:
     for r,c in sp:
        if r>0.1:
              ....#replace the sphere by clump

Bettina Suhr (bettina-suhr) said : #8

Dear lip,

You might want to check the “trunk/examples/clumps” folder , for examples how clumps are defined.

Regarding your question 2: read the replaceByClumps-example.py example. Here, makeCloud() is used to generate spheres, which are than replaced by clumps.

Regards,
Bettina

Can you help with this problem?

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

To post a message you must log in.