yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #27758
[Question #701793]: Replace by clump
New question #701793 on Yade:
https://answers.launchpad.net/yade/+question/701793
Hello everybody.
I am beginner in yade.
I created a specific aggregate grading with 'psdSizes & psdCumm ' in ' makeCloud '.
Now I want to select two specific ranges of particles and replac them with two different Clumps.
It is a part of my code ####product trash#####
a=[0,.005,.01,.015,.02,.025,.03,.035]
b=[0,.005,.01,.015,.02,.025,.03,.035,.04,.045,.05,.055,.06,.065,.07,.075]
c=[0,.005]
d=[]
for i in a:
for j in b:
for k in c:
d.append((i,j,k))
for i in d:
O.bodies.appendClumped([sphere((i),.005)])
######clump 1#####
clump=O.bodies.appendClumped([sphere((0,0,0),.002),sphere((.002,0,0),.002)])
#####aggregate#####
from yade import pack
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(1,1,1),psdSizes=[.001,.002,.078,.08],psdCumm=[0,.07,.71,1])
sp.toSimulation()
######replace######
for b in O.bodies:
if b.shape.radiuse>.078:
pass
else:
#the particle should be replaced by clump1. ################################## I do not use the 'clumpTemplate' and 'replaceByClumps' commands because these commands select a percentage of the particles randomly and do not take into account the grain size. As a result, they may replace particles of the wrong sizes with the clump we do not intend.
Please guide me in replace part.
--
You received this question notification because your team yade-users is
an answer contact for Yade.