yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #11744
Re: [Question #270627]: translate problem
Question #270627 on Yade changed:
https://answers.launchpad.net/yade/+question/270627
MOUSSIER posted a new comment:
Hello Jan,
Thanks for your answer. Here is the concerned code refering to the clumps creation :
(Previously, boxes where created surrounding softSoilMat clumps and
sphereMat clumps, a seperation box between different materials was also
set up).
softSoilMatId=O.materials.append(FrictMat(density=1e3,young=softSoilYoung,poisson=0.3,frictionAngle=radians(60.),label='softSoilMat'))
sphereMatId=O.materials.append(FrictMat(density=3100,young=EY,poisson=0.5,frictionAngle=radians(20),label='sphereMat'))
sp=pack.SpherePack()
sp2=pack.SpherePack()
sp3=pack.SpherePack()
sp4=pack.SpherePack()
clumpList=[]
softSoilList=[]
for i in range(0,1000):
r=(radiusMax-radiusMin)*rand()**3+radiusMin
clumpList.append(pack.SpherePack([ ((0,0,0),r),((r*1.00001,0,0),r) ]))
softSoilList.append(pack.SpherePack([ ((0,0,0),r),((r*1.00001,0,0),r) ]))
if(enableGrid):
sp.makeClumpCloud((0.,0.,0.),(length,gridOrigin[1]-gridRadius,width),clumpList,periodic=False,seed=5,num=int(numberOfClumps*(gridPos/(1.5*height))))
sp.toSimulation(material='sphereMat',mask=25,color=(0.6+0.15*rand(),0.5+0.15*rand(),0.15+0.15*rand()))
sp.translate(Vector3(0.,gridOrigin[1]+gridRadius,0.))
sp.toSimulation(material='sphereMat',mask=25,color=(0.6+0.15*rand(),0.5+0.15*rand(),0.15+0.15*rand()))
sp.translate(Vector3(0.,gridOrigin[1]+gridRadius,0.))
sp.toSimulation(material='sphereMat',mask=25,color=(0.6+0.15*rand(),0.5+0.15*rand(),0.15+0.15*rand()))
sp2.makeClumpCloud((RIlength,-height,RIlength),(length-RIlength,0.,2*RIlength),softSoilList,periodic=False,seed=5,num=int(0.2/1.3*numClumpsSoft))
sp2.translate(Vector3(0.,0.,-RIlength))
sp2.toSimulation(material='softSoilMat',mask=25,color=orange)
sp2.translate(Vector3(0.,0.,length-RIlength))
sp2.toSimulation(material='softSoilMat',mask=25,color=orange)
sp3.makeClumpCloud((RIlength,-height,RIlength),(2*RIlength,0.,length-RIlength),softSoilList,periodic=False,seed=5,num=int(0.2/1.3*numClumpsSoft))
sp3.translate(Vector3(-RIlength,0.,0))
sp3.toSimulation(material='softSoilMat',mask=25,color=orange)
sp3.translate(Vector3(length-RIlength,0.,0.))
sp3.toSimulation(material='softSoilMat',mask=25,color=orange)
sp4.makeClumpCloud((RIlength,-height,RIlength),(length-RIlength,0.,width-RIlength),softSoilList,periodic=False,seed=5,num=numClumpsSoft)
sp4.toSimulation(material='softSoilMat',mask=25,color=orange)
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.