use GenGeo to construct a regular structured packing as loading platen

Asked by ceguo

Hi everyone,

I'm trying to use GenGeo to construct a shear cell composed of three layers: the lower and upper layers are loading platens and the middle one is the granular packing to be sheared. I wish the loading platens have a regular structure or at least densely packed. But now GenGeo always gives me two randomly and loosely packed loading platens. What can I do? The script is pretty much like the 2D shear case provided in the Example folder. I also found addPlane (or addLine) in the script is not necessary, isn't it?

from GenGeo import Vector3, BoxWithPlanes3D, CircMNTable3D, InsertGenerator3D, Plane

# Define domain:
length = 20.0; width = 16.0; height = 20.0
platen = 2.0

minPoint = Vector3(-0.5*length,-platen,-0.5*width)
maxPoint = Vector3(0.5*length,height+platen,0.5*width)
minRadius = 0.3
maxRadius = 0.5

mntable = CircMNTable3D (
   minPoint = minPoint,
   maxPoint = maxPoint,
   gridSize = 2.5*maxRadius,
   numGroups = 3
)

platenSph = InsertGenerator3D (
   minRadius = minRadius,
   maxRadius = minRadius,
   insertFails = 5000,
   maxIterations = 5000,
   tolerance = 1.0e-6,
   seed = False
)

lbox = BoxWithPlanes3D (
   minPoint = minPoint,
   maxPoint = Vector3(0.5*length,0.0,0.5*width)
)
lbox.addPlane(Plane(minPoint, Vector3(1,0,0)))
lbox.addPlane(Plane(minPoint, Vector3(0,1,0)))
lbox.addPlane(Plane(minPoint, Vector3(0,0,1)))
lbox.addPlane(Plane(Vector3(0.5*length,0.0,0.5*width), Vector3(-1,0,0)))
lbox.addPlane(Plane(Vector3(0.5*length,0.0,0.5*width), Vector3(0,-1,0)))
lbox.addPlane(Plane(Vector3(0.5*length,0.0,0.5*width), Vector3(0,0,-1)))
platenSph.generatePacking( volume = lbox, ntable = mntable, groupID = 0, tag = 3)
mntable.generateBonds(groupID = 0, tolerance = 1.e-5, bondID = 1)

ubox = BoxWithPlanes3D (
   minPoint = Vector3(-0.5*length,height,-0.5*width),
   maxPoint = maxPoint
)
ubox.addPlane(Plane(Vector3(-0.5*length,height,-0.5*width), Vector3(1,0,0)))
ubox.addPlane(Plane(Vector3(-0.5*length,height,-0.5*width), Vector3(0,1,0)))
ubox.addPlane(Plane(Vector3(-0.5*length,height,-0.5*width), Vector3(0,0,1)))
ubox.addPlane(Plane(maxPoint, Vector3(-1,0,0)))
ubox.addPlane(Plane(maxPoint, Vector3(0,-1,0)))
ubox.addPlane(Plane(maxPoint, Vector3(0,0,-1)))
platenSph.generatePacking( volume = ubox, ntable = mntable, groupID = 1, tag = 4)
mntable.generateBonds(groupID = 1, tolerance = 1.e-5, bondID = 1)

packer = InsertGenerator3D (
   minRadius = minRadius,
   maxRadius = maxRadius,
   insertFails = 5000,
   maxIterations = 5000,
   tolerance = 1.0e-6
)

mbox = BoxWithPlanes3D (
   minPoint = Vector3(-0.5*length,0.0,-0.5*width),
   maxPoint = Vector3(0.5*length,height,0.5*width)
)
mbox.addPlane(Plane(Vector3(-0.5*length,0.0,-0.5*width), Vector3(1,0,0)))
mbox.addPlane(Plane(Vector3(-0.5*length,0.0,-0.5*width), Vector3(0,1,0)))
mbox.addPlane(Plane(Vector3(-0.5*length,0.0,-0.5*width), Vector3(0,0,1)))
mbox.addPlane(Plane(Vector3(0.5*length,height,0.5*width), Vector3(-1,0,0)))
mbox.addPlane(Plane(Vector3(0.5*length,height,0.5*width), Vector3(0,-1,0)))
mbox.addPlane(Plane(Vector3(0.5*length,height,0.5*width), Vector3(0,0,-1)))
packer.generatePacking( volume = mbox, ntable = mntable, groupID = 2, tag = 0)

mntable.write(
   fileName = "threelayer.geo",
   outputStyle = 1
)

mntable.write(
   fileName = "threelayer.vtu",
   outputStyle = 2
)

Question information

Language:
English Edit question
Status:
Solved
For:
ESyS-Particle Edit question
Assignee:
No assignee Edit question
Solved by:
Dion Weatherley
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Toketo (tomcarlosimborio) said :
#1

Hmmm. I'm also new to ESyS-P but you might as well check the gouge example in LSMGengeo. :D

~Tom

Revision history for this message
Dion Weatherley (d-weatherley) said :
#2

Hi Ceguo,

As a starting point, I recommend you use the latest version of gengeo (or at least the v1.0 stable version). Note that the 'from GenGeo import ...' line in your script needs to change to:

from gengeo import *

I ran your script with a recent version of gengeo and it appeared to produce a decent regular packing of spheres for the top and bottom layer.

Cheers,

Dion

Revision history for this message
ceguo (hhh-guo) said :
#3

Hi Dion,

Thanks for your reply. After I updated the gengeo to the newest version and change the first line to from gengeo import *, I still get the similar packing as previous one, see the link below.

https://dl.dropboxusercontent.com/u/7120187/packing.tif

What does your generated packing look like?

Ning

Revision history for this message
SteffenAbe (s-abe) said :
#4

Hi Ning,

I've tested your script too. Using the current (rev.125) bazaar version of gengeo it seems to work as expected.
I've sent you an image by mail.

Steffen

Revision history for this message
ceguo (hhh-guo) said :
#5

Thanks SteffenAbe, that solved my question.

Revision history for this message
ceguo (hhh-guo) said :
#6

Thanks Dion and Steffen,

There is no problem for gengeo. It's my fault to forget to turn off "Mask Points" in Paraview. Sorry for the trouble.

Ning

Revision history for this message
ceguo (hhh-guo) said :
#7

Hi everyone,

Sorry to reopen the thread. But I have another relevant question. When I use two bonded layers (top and bottom) to drive the sample in periodic condition. It is found later there would be a small gap in the two layers ( not perfectly infinite in the periodic direction, see the figure). Maybe it is insignificant in simulation, but it is annoying and I want to get rid of it. I wonder if anyone has experience in this issue.

https://dl.dropboxusercontent.com/u/7120187/shearcell.png

Ning

Revision history for this message
Best Dion Weatherley (d-weatherley) said :
#8

Hi Ning,

This little gap can be fixed by specifying the width of the box representing the platen to be larger in the x-direction than the width of your domain. CircMNTable3D will then pack in a few extra particles to fill the gap.

Cheers,

Dion

Revision history for this message
ceguo (hhh-guo) said :
#9

Thanks Dion Weatherley, that solved my question.