← Back to team overview

yade-users team mailing list archive

Re: [Question #675477]: Simulate particle breaking by fragment replace method

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello Yang,

> How can I achieve the process of replacing large particle with smaller
particles ?

You can do it directly in python, something like:
###
def selectBodiesToCrush():
   stresses = bodyStressTensors() # e.g. based on overall particle stress
   ret = []
   for i,stress in enumerate(stresses):
      if stress[0,0] > 10e6: # should be some more sophisticated condition :-)
         ret.append(i)
   return ret

def createChildren(b):
   p = b.state.pos
   r = b.shape.radius
   # two spheres somehow located, should be more sophisticated, too
   s1 = sphere(p+(.5*r,0,0),.5*r)
   s2 = sphere(p-(.5*r,0,0),.5*r)
   return s1,s2

bodiesToDelete = selectBodiesToCrush()
for i in bodiesToDelete:
   b = O.bodies[i]
   children = createChildren(b)
   O.bodies.erase(i)
   O.bodies.append(children)
###

Also have a look on existing solution for polyhedrons [1,2,3].

The specific solution depends on maaany factors (particle shape, desired
results, computer resources...)

cheers
Jan

[1] https://github.com/yade/trunk/tree/master/examples/polyhedraBreak
[2] https://github.com/yade/trunk/blob/master/pkg/dem/Polyhedra_splitter.cpp
[Elias2014]	Jan Eliáš (2014), Simulation of railway ballast using crushable polyhedral particles. Powder Technology (264), pages 458–465. DOI 10.1016/j.powtec.2014.05.052

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