How to develop voids of different sizes to a dense pack material

Asked by Samuel Lu

Hi all,

I'm trying to develop a geopolymer foam concrete model with a semi-circular bend shape with a notch at its center. It follows the Brazilian SCB test. I am very new to Ubuntu and programming and I'm struggling to even code this model out.

Like I mentioned, the model of this foam concrete is semi-circular with a notch. I've coded this using the following code

# 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))

The mortar particles are of radius = 0.074mm. Using a randomDensePack(), I'm able to achieve a dense concrete semi-circular shape with a notch shown below.

# Use the predicate to generate sphere packing inside
sp=SpherePack()
sp=pack.randomDensePack(pred,radius=rSphere,memoizeDb='/tmp/triaxPackCache.sqlite',spheresInCell=14500,returnSpherePack=True)
sp.toSimulation()

# to see it
from yade import qt
qt.Controller()
qt.View()

I'm currently stuck at trying to form air voids with size of rMean = 2.5mm and rRelFuzz = 1.7mm with approximately 600 of these particles randomly placed in the semi-circular shape. I was advised to subtract a spherepack from the pred I created earlier but that didn't really work out. I've also tried creating a sphereCloud pack but it collides with the dense pack that I created earlier. How can I subtract these void particles from the densepack to have a porous appearance

It would be awesome if someone could assist me in this area! Thanks in advance

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Best Jan Stránský (honzik) said :
#1

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

Revision history for this message
Samuel Lu (samuellu) said :
#2

Thanks Jan Stránský, that solved my question.

Revision history for this message
Samuel Lu (samuellu) said :
#3

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ý <email address hidden>
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.
>