getroundness

Asked by mohsen on 2017-06-26

In the name of God

Hi All.

I want to get the roundness of on clump body . first i generate the clump:

O.bodies.append(utils.sphere((0,.1,0),0.4,color=Vector3(1,.9,.15)))
O.bodies.append(utils.sphere((0,-.17,-0.05),0.33,color=Vector3(1,.9,.15)))

O.bodies.clump(range(0,len(O.bodies)))

Then i enter in terminal:

O.bodies.getroundness()

But the answer is 0.

Any help?

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2017-06-26
Last reply:
2017-06-28
mohsen (agha-mohsena) said : #1

sorry; the getRoundness doe not work for this clump:

for z in ([-0.1,.1]):
 for y in ([-0.18,-.07,.07,.18]):
  pos =Vector3(-.14,y,z)
  O.bodies.append(utils.sphere(pos,.24,color=Vector3(1,.9,.15)))

for x,y in [(0,.18),(.15,.18),(.08,.07),(.01,-.07),(-0.07,-.18)]:
 for z in ([-0.1,.1]):

  pos =Vector3(x,y,z)
  O.bodies.append(utils.sphere(pos,0.24,color=Vector3(1,.9,.15)))
O.bodies.clump(range(0,len(O.bodies)))

Regards

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

Hi Mohsen,
I don't know the method, but have a look at the source code. Maybe the method does not work for overlapping spheres?
cheers
Jan

mohsen (agha-mohsena) said : #3

Thanks Jan

Regards

Christian Jakob (jakob-ifgt) said : #4

Hi,

I developed the code for getRoundness function. It should work for any mixed clump-sphere-packing. You can have a look at the source code [1]. I dont know why it is not working in your case. Can you provide a minimal working example [2]?

[1] https://github.com/yade/trunk/blob/master/py/wrapper/yadeWrapper.cpp#L355
[2] https://en.wikipedia.org/wiki/Minimal_Working_Example

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

@Christian: for MWE, see #1 (1st answer, actually Mohsen's comment) of this thread.
After a quick look, the only suspicious circumstance I saw was that the spheres were overlapping
Jan

mohsen (agha-mohsena) said : #6

Hi Christian:

Thank you, as Jan said, you can run the clump in #1.
An other point is that, these days i am working on roundness very much; the getRoundness sometimes give no answer!

Can you help with this problem?

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

To post a message you must log in.