Materials for spheres generated via makeCloud

Asked by Christopher Stanbridge

I noticed, when reviewing the documentation for the makeCloud sphere-packing function, that it was not possible to specify a material for the spheres as one of the parameters. How would one generate a cloud of spheres of a specific material? Furthermore, what material is used by default -- is it the most recently created one?

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Raphaël Maurin
Solved:
Last query:
Last reply:
Revision history for this message
Best Raphaël Maurin (raphael-maurin) said :
#1

Hi Christopher,

I am using makecloud and specifying a material, for that I do :

#Define the material
O.materials.append(ViscElMat(cn=cnPart, cs=csPart, kn=knPart, ks=ksPart, density=densPart, frictionAngle=partFrictAngle, label='sphereMat'))
partCloud = pack.SpherePack()
#Specify the property of the particle cloud wanted
partCloud.makeCloud(minCorner=(0,widthCell/2.0,groundPosition+radius*4),maxCorner=(length,widthCell/2.0,heightCell),rRelFuzz=0,rMean=radius, num = 1000)
#send to simulation assigning the material
partCloud.toSimulation(material='sphereMat')

And for your second question, I would say (but I am not sure) that it is indeed the most recently created material that is assigned if you don't specify anything. You can check that easily by yourself, by trying it.

Raphael

Revision history for this message
Christopher Stanbridge (cws105) said :
#2

Thanks Raphaël Maurin, that solved my question.