← Back to team overview

yade-users team mailing list archive

Re: [Question #679387]: packing of spheres with different properties

 

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

Rioual gave more information on the question:
Hello Jan,

Thanks for your clear answers.
So, I did what you propose and I have error messages:
"
0 <FrictMat instance at 0x334f6c0>
1 <CohFrictMat instance at 0x3353f80>
2 <CohFrictMat instance at 0x34607a0>
......
799 <CohFrictMat instance at 0x34a1080>
800 <FrictMat instance at 0x334f6c0>
801 <FrictMat instance at 0x334f6c0>
802 <FrictMat instance at 0x334f6c0>
803 <FrictMat instance at 0x334f6c0>
804 <FrictMat instance at 0x334f6c0>
805 <FrictMat instance at 0x334f6c0>
"

A problem with the numbering of the bodies in the for loops??

.... My code is below


Best 

Fr.



*****************************************************************

from yade import pack

num_spheres=1000# number of spheres

nspc= int(num_spheres*3/5)
nspb= int(num_spheres*1/5)

young=1e6
C=1e6
compFricDegree = 30 # initial contact friction during the confining phase
finalFricDegree = 11 # contact friction during the deviatoric loading (for ice!!)

targetPorosity = 0.5
mn,mx=Vector3(0,0,0),Vector3(1,1,1) # corners of the initial packing


#walls

O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=0,density=0,label='walls'))
walls=aabbWalls([mn,mx],thickness=0,material='walls')
wallIds=O.bodies.append(walls)

#
sp=yade.pack.SpherePack()
nc= sp.makeCloud(mn,mx,-0.5,0.3,nspc,False, 0.95,seed=1) #" first packing c
nb =sp.makeCloud(mn,mx,-0.2,0.3,nspb,False, 0.95,seed=1) #"second packing b

sp.toSimulation()

for i in range(0,nc):
	O.bodies[i].mat = CohFrictMat(young=young,poisson=0.5,fragile=True, normalCohesion =  C,shearCohesion=C,frictionAngle=radians(compFricDegree),density=2600, label='cristal')

# set material of spheres with ids from nc to nb (the 2nd makeCloud)
for i in range(nc,nb):
	O.bodies[i].mat = CohFrictMat(young=young,poisson=0.5,fragile=True, normalCohesion = C, shearCohesion=C,frictionAngle=radians(compFricDegree),density=1,label='bubble')

# check
for b in O.bodies:
   print b.id,b.mat
###

********************************************************************************************

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