← Back to team overview

yade-users team mailing list archive

Re: [Question #655455]: Apply compressive or tensile force to a packed geometry of spheres

 

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

Jan Stránský proposed the following answer:
> Now I am trying to apply a force to this group of spheres:

you have to assign force to each sphere:
for sphere in spheres:
   O.forces.setPermF(sphere.id,(1,1,1)) # probably Vector3(1,1,1) / len(O.bodies)
   #O.forces.addF(sphere.id,(1,1,1),permanent=True)

or you can create a rigid clump instead of O.bodies.append (depending on your needs):
cid,bids = O.bodies.appendClumped(spheres)
O.forces.setPermF(cid,(1,1,1))
#O.forces.addF(cid,(1,1,1),permanent=True)

cheers
Jan

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