← Back to team overview

yade-users team mailing list archive

Re: [Question #685375]: Converting polyhedron body to Potential Particle or Potential Block

 

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

    Status: Open => Answered

Vasileios Angelidakis proposed the following answer:
Hi Ali,

To answer your question briefly, there is no built in function to make
the transformation, but you can develop a function to do this. In more
detail:

- Converting a polyhedron to a Potential Particle (PP) is not an exact
transformation, since the edges of a PP are rounded and its faces are
curved, so there is not an exact analogy between the shape of a PP  and
the polyhedral shape it is based upon. Though, you can approximate a
polyhedron closely enough with a Potential Particle, ending up with a
particle shape which is based on a polyhedron, and is a rounded version
of it. If you would like to model a PP with fairly sharp edges (still
rounded, but with a small radius "r") and with practically flat faces
(very small value for k; close to zero), you can get something close
enough to the original polyhedron.

- Converting a polyhedron to a Potential Block (PB) on the other hand is
less complicated, since both codes (Polyhedra & PotentialBlock) simulate
polyhedral particle shapes with sharp edges and flat faces.

To make the transformation from polyhedra to PP or PB:
After you have defined a polyhedron, you can use its attribute b.shape.getSurfaces() [1] to get the indices of the vertices lying on each face. You can calculate the normal vector for each face (coefficients: "a,b,c" of the Potential Blocks) by defining two vectors on each face and considering their cross product. Then, using a vertex on each face, you can then calculate the coefficients "d". The only thing left to define a Potential Block is to assume a radius "r", which is rather a modelling choice (i.e. there is no right/wrong value, as long as the chosen value is fairly small in regards to the particle dimensions). The selected value of "r" should then be deducted from each parameter d (i.e. d[i]=d[i]-r), to achieve the exact size of the initial polyhedral shape.

Hope this helps.
All the best,
Vasileios

[1] https://yade-
dem.org/doc/yade.wrapper.html#yade.wrapper.Polyhedra.GetSurfaces

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