yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #19553
Re: [Question #680375]: How to delete 10% percent of small particles?
Question #680375 on Yade changed:
https://answers.launchpad.net/yade/+question/680375
Jan Stránský proposed the following answer:
Hello,
use PyRunner [1]:
###
def getSmallParticles():
ret = []
# fill ret with particles satisfying "10% percent of small particles"
return ret
def deleteSmallParticles():
for b in getSmallParticles():
O.bodies.erase(b.id)
O.engines = [
...
PyRunner(iterPeriod=100,command="deleteSmallParticles()"),
]
###
cheers
Jan
[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.PyRunner
--
You received this question notification because your team yade-users is
an answer contact for Yade.