← 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

Samuel Lu posted a new comment:
Hi Jan,

Thank you so very much!That's exactly what I was looking for! I've tried
asking everyone I know and couldn't come up with a solution, so this is
greatly appreciated!

I tried using in.Sphere() but did not use the "for" loop. It basically
simulated a circular tunnel through the pred.
Using sphere cloud, the sphere's wasn't contained in the pred. I tried to
subtract it like what you did, but the whole object disappeared.

Anyway, thank you so much for your help once again :)

Kind Regards,
Sam

On 21 May 2018 at 21:09, Jan Stránský <question669045@xxxxxxxxxxxxxxxxxxxxx>
wrote:

> Your 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
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/yade/+question/669045/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/yade/+question/669045
>
> You received this question notification because you asked the question.
>

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