← Back to team overview

yade-users team mailing list archive

Re: [Question #626814]: Calculate the particle size distribution after particle crushing

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Yes, you get IDs of spheres forming individual macro-grains.

I think your question should be split:
- how to get individual standalone grains? now it should be answered
- how to determine size of one macro-grain? who knows, it's up to you :-)

if you know the sizes, PDS is trivial

Macro-grain = set of spheres. The "size" of such set is not uniquely
defined and there are maaaany ways how to define/evaluate it, the right
choice depends on your needs.

The easiest is size of a set of spheres is its AABB. It is quick to code
and compute, but you get different results for the same grains that are
differently rotated.

code (not tested):
############################
def evalSize(idsOfOneGrain):
   aabbmin = Vector3(+1e20,+1e20,+1e20)
   aabbmax = Vector3(-1e20,-1e20,-1e20)
   for id in ids: # for each sphere
      b = O.bodies[id]
      for d in (0,1,2): # for x.y.z directions
         aabbmax[d] = max(aabbmax[d], b.state.pos+b.shape.radius)
         aabbmin[d] = min(aabbmin[d], b.state.pos+b.shape.radius)
   dims = sorted(aabbmax-aabbmin)
   return dims[2] # largest, size, see below
###########################

even with the most simple assumption that the grain is axis-aligned box, how to define "size"? maximum size? minimum size? some diagonal size? should it pass circular openings? square openings? ........ :-)
that was the point of my (*)

You can define the size as (just brainstorming):
- size of not axis aligned, but oriented box and trying to find such dimensions and rotation minimizing the sizes
- size of smallest possible sphere containing all particles
- size of smallest possible ellipsoid containing all particles
- size of convex hull of the spheres
- ...

cheers
Jan

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