← Back to team overview

yade-users team mailing list archive

Re: [Question #689434]: How to generate many polyhedra randomly without specific data in Potential Blocks code?

 

Question #689434 on Yade changed:
https://answers.launchpad.net/yade/+question/689434

    Status: Open => Answered

Vasileios Angelidakis proposed the following answer:
Hi weijie,

Currently, I have not written a dedicated function to do something like
this for the Potential Blocks. What you need to define a particle using
this code, are mainly the equations of the planes corresponding to the
particle faces, i.e. the coefficients "a,b,c,d". And then, you can
choose an appropriate radius "r", which will be used in the calculation
of the contact normals when a contact occurs.

To calculate the plane coefficients a,b,c,d, you need to have a mesh of the particle surface (vertices and connectivity), which this code currently does not give you. You can though use a different approach to calculate such a mesh, and then transform it into a Potential Block. E.g, the polyhedra code has a very nice function to generate random polyhedra with controlled size [1] and it also gives you the connectivity of the vertices making the particle surface [2].
You might find [3] helpful.

All the best, Vasileios

[1] https://gitlab.com/yade-dev/trunk/-/blob/master/examples/polyhedra/irregular.py#L26
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Polyhedra.GetSurfaces
[3] https://answers.launchpad.net/yade/+question/685375

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.