← Back to team overview

yade-users team mailing list archive

Re: [Question #662544]: How to clump spheres and facet

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
> 1. the wires on the outer surface are shining (clump-with-surface).
> In the case of clump with surface, you can see the colours of the wires are changing when the clump drop.

the wires are just triangles forming the facets, no interactions. They
are changing colors because the wires with different colors occupy same
edges and randomly is visible one or the other

> The computational time is quite shorter

yes, but the reason is that the facets are not clumped and they are not
manipulated (like their pos and ori updated) during the clump motion

you can try to loop over interactions and test whether there are some interactions between spheres and the facets of the clump, something like (not tested):
###
def intCheck(): # to be e.g. with PyRunner
   n = 0
   for i in O.interactions:
      b1,b2 = [O.bodies[id] for id in (i.id1,i.id2)]
      if ( isinstance(b1.shape,Sphere) and isinstance(b2.shape,Facet) ) or ( isinstance(b1.shape,Facet) and isinstance(b2.shape,Sphere) ):
         if b1.id in O3 and b2.id in O3:
            n += 1
   print n
###

cheers
Jan

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