problem with shape of polyhedra

Asked by Mehrad

Hi
I use this code to import po
lyheadra in Yade. however , I need to know how can I import triangle_polyhedra in yade ??

The script is:
from yade import polyhedra_utils,pack
import random

polyMat = PolyhedraMat(density=3000,young=1e10,poisson=.5,frictionAngle=atan(0.8))
O.materials.append(polyMat)

t=polyhedra_utils.polyhedra(polyMat,(.6,.6,.6),v=[])
t.state.pos = (0.5,0.5,4)
O.bodies.append(t)

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Robert Caulk
Solved:
Last query:
Last reply:
Revision history for this message
Best Robert Caulk (rcaulk) said :
#1

Hello,

To create arbitrarily shaped polyhedra, you simply provide your desired vertices to polyhedra_utils.polyhedra [1]. Here is an abritrary tetrahedral as an example:

t=polyhedra_utils.polyhedra(polyMat,(.6,.6,.6),v=[(0,0,0),(0,0,1),(0,1,0),(1,0,0)])

[1]https://yade-dem.org/doc/yade.polyhedra_utils.html#yade.polyhedra_utils.polyhedra

Revision history for this message
Jan Stránský (honzik) said :
#2

Hello,

> how can I import triangle_polyhedra in yade ?

what is "triangle_polyhedra"?

If something like facet, I think true planar triangles modeled by polyhedrons would have problems. On the other hand, I **expect** (not tested) no problem using prisms with low height ("almost planar tirangles").
Jan

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#3

If the objective is to have a 'triangular' polyhedron (not very clear the question) I would definitely suggest PFacets: one single facet (3 nodes) will do the trick, while true polyhedra would need at least 6 nodes (for a prism).
Bruno

Revision history for this message
Mehrad (hossein.pianist) said :
#4

Thanks Robert Caulk, that solved my question.