# Can't clump facet together

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:

Aborted (core dumped)

Can someone help me? Thanks.

## Question information

Language:
English Edit question
Status:
Solved
For:
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
 Revision history for this message Jan Stránský (honzik) said on 2021-03-15: #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?

cheers
Jan

 Revision history for this message Huang peilun (hpl16) said on 2021-03-15: #2

 Revision history for this message Huang peilun (hpl16) said on 2021-03-15: #3

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

 Revision history for this message Huang peilun (hpl16) said on 2021-03-15: #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?

 Revision history for this message Jan Stránský (honzik) said on 2021-03-15: #5

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)

cheers
Jan

 Revision history for this message Huang peilun (hpl16) said on 2021-03-16: #6

> 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.

 Revision history for this message Jan Stránský (honzik) said on 2021-03-16: #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

 Revision history for this message Huang peilun (hpl16) said on 2021-03-17: #8

Thanks, that solved my question.