← Back to team overview

yade-users team mailing list archive

Re: [Question #669045]: How to develop voids of different sizes to a dense pack material

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Samuel,

> sp=pack.randomDensePack(...,spheresInCell=14500,...)

spheresInCell parameter is just how many particles is used for the
periodic compression, it does not correspond to actual specimen. Use
values like 500 to save preparation time.

> I was advised to subtract a spherepack from the pred I created earlier
but that didn't really work out.

please always be as specific as possible concerning your problem. "but
that didn't really work out" tells us nothing useful.. Was there an
error? It did something different that you expected? ...?

> I've also tried creating a sphereCloud pack but it collides with the
dense pack that I created earlier.

If I got your problem correctly, that it collodes with the dense pack is
exactly what you want..

A possible approach:
###
# Notch dimensions with cylinder and mortar radius 
boxSize=Vector3(23.75e-3,1.0e-3,12.5e-3)
RadofCylinder=47.5e-3
rSphere=0.74e-3

# Construct spatial predicate as difference of box and cylinder:
pred=pack.inCylinder((-0.5*boxSize[0],0,0),(0.5*boxSize[0],0,0),RadofCylinder) - pack.inAlignedBox((-0.5*boxSize[0],-0.5*boxSize[1],0),(0.5*boxSize[0],0.5*boxSize[1],0.5*boxSize[2])) - pack.inAlignedBox((-5,-5,-5),(5,5,0))

sp=SpherePack()
# update boundaries, num and rRelFuzz according to your needs
sp.makeCloud((-0.5*boxSize[0],-RadofCylinder,0),(0.5*boxSize[0],RadofCylinder,RadofCylinder),num=200,rMean=2.5e-3,rRelFuzz=0.6)
for c,r in sp:
   pred = pred - pack.inSphere(c,r)

# Use the predicate to generate sphere packing inside
sp=SpherePack()
sp=pack.randomDensePack(pred,radius=rSphere,spheresInCell=500,returnSpherePack=True)
sp.toSimulation()
###

let us know if this is what you want or not..
cheers
Jan

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