Can't clump facet together

Asked by Huang peilun on 2021-03-15

Hi,
I'm trying to clump facet together to create a boundary that is not cuboid. My code is as followed:

####################################################

f1=facet(vertices=[(0,0,0),(0,1,0),(1,0,0)],wire=False)
f2=facet(vertices=[(1,1,0),(0,1,0),(1,0,0)],wire=False)
O.bodies.appendClumped((f1,f2))

####################################################

But it reports error like this:

python3.6: /builds/yade-dev/trunk/deb/yadedaily/core/Clump.cpp:242: static void yade::Clump::updateProperties(const boost::shared_ptr<yade::Body>&, unsigned int): Assertion `M > 0' failed.
Aborted (core dumped)

Can someone help me? Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
2021-03-15
Last query:
2021-03-15
Last reply:
2021-03-15
Best Jan Stránský (honzik) said : #1

Hello,

assign mass (and inertia, depending on your needs [1]) to the facets
###
f1=facet(vertices=[(0,0,0),(0,1,0),(1,0,0)],wire=False)
f2=facet(vertices=[(1,1,0),(0,1,0),(1,0,0)],wire=False)
f1.state.mass = 1
f2.state.mass = 1
O.bodies.appendClumped((f1,f2))
###

Do you need a clump for the boundary?
Why are Individual facets not suitable?

Also next time please provide more information, e.g. Yade version [1] (I have some older versions, which does not produce the error)

cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

Huang peilun (hpl16) said : #2

Thanks, I'll pay attention to provide more information next time.

Huang peilun (hpl16) said : #3

Thanks Jan Stránský, that solved my question.

Huang peilun (hpl16) said : #4

Yes, I need a clump for the boundary. I want to create a boundary that is not cuboid, like a polyhedron. But I'm not proficient in using Yade. The only thought that came up to me is using facets and put them together. Can you give me some advice?

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

> Thanks, I'll pay attention to provide more information next time.

for discussion continuation, why not providing more info already this time? :-)
E.g. what is "a boundary"? Why are (fixed, not moving) individual facets not suitable and why you need a clump?

Using facets for this purpose is fine [2,3,4,5], but normally you do not need at all to clump the facets [2,3,4,5].
(Links are to gitlab source code, or you can find the files in "examples" directory in yade directory, e.g. if you download it)

But it is difficult to give advises without more info..

cheers
Jan

[2] https://gitlab.com/yade-dev/trunk/-/blob/master/examples/gts-horse/gts-horse.py
[3] https://gitlab.com/yade-dev/trunk/-/blob/master/examples/bulldozer/bulldozer.py
[4] https://gitlab.com/yade-dev/trunk/-/blob/master/examples/funnel.py
[5] https://yade-dem.org/doc/user.html#boundary-representation-brep

Huang peilun (hpl16) said : #6

> for discussion continuation, why not providing more info already this time? :-)

Really sorry about that.

> what is "a boudary"?

I want to simulate the sampler of the standard penetration test. The shape of the driving shoe is not of regular shape, therefore can not be represented by box object or cylinder. It's like a tube and with a contraction at the top. I was told that the shape of the driving shoe do have effect on the result of the SPT but I am not sure how large the impact is. So I want to simulate the exact shape. I tried polyhedron but in that case I can't use CohFrictMat. Because Ig2 for sphere and polyhedra only support ScGeom and CohFrictPhys need ScGeom6D. If I don't use CohFrictPhys, the macroscopic friction angle is too small and not like the real soil.

> Why are (fixed, not moving) individual facets not suitable and why you need a clump?

I clump the facets together so that I can simulate the exact shape. In my understanding, individual facets are of triangle shape and can not move together. In my case I need the boundary of the sampler to move together. Thus I have to clump them together.

>Using facets for this purpose is fine [2,3,4,5], but normally you do not need at all to clump the facets [2,3,4,5].

Thanks for your advice. I am going to study these code to see if they can help.

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

> In my understanding, individual facets are of triangle shape and can not move together. In my case I need the boundary of the sampler to move together. Thus I have to clump them together.

ok, thanks for info, now we come to the source of the misunderstaing.
You do not need to clump facets at all :-)
Just create them to the shape you want and then you can translate / rotate them, together, but without the need of clumping them.
E.g. in the bulldozer example, TranslationEngine is used for this purpose.
Or you can just assign same velocity to all facets (they are not dynamic by default, so they will continue with the defined velocity).
You can also do some servo control to simulate force control of the facets (prescribing motion such that the resulting forces matches the prescribed force evolution).

If you need the complex shape as a one independent dynamic body, then clumping is appropriate.

cheers
Jan

Huang peilun (hpl16) said : #8

Thanks, that solved my question.