yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #20503
Re: [Question #683388]: How to clump spheres and facet obtained from stl format
Question #683388 on Yade changed:
https://answers.launchpad.net/yade/+question/683388
Irfaan Peerun gave more information on the question:
Just an update:
I have managed to convert the .stl file to .gts using the following command: stl2gts -r < filename.stl > filename.gts
gmsh and libgts-bin need to be installed to do so.
So now I have a surface which was imported in .gts format using the
command: surf=gts.read(open('filename.gts'))
My next step is to fill the surface with spheres of various sizes and
clump them together to produce a body of the same volume and geometry as
the surface. This would require overlapping of spheres.
I used the pack.randomDensePack function with sphere radius=0.00005 and
realfuzz=0.000005. The average range diameter of the surface 2.36mm to
1.18mm. Hence, my questions are:
[1] Is the pack.randomDensePack function appropriate for this situation?
Any rule of thumb in deciding the sphere radius? Does the function
include overlapping of spheres?
[2] By adding memoizeDb='/tmp/gts-packings.sqlite', does it mean that a
temporary sqlite file will be created to store the packing that will be
generated?
[3] Is there any function to obtain the clump volume as comparison to
the imported gts surface.
When running the script, I received the following error along with a blank view (no sphere or surface):
WARN /build/yade-fDuCoe/yade-2018.02b/pkg/common/InsertionSortCollider.cpp:242 action: verletDist is set to 0 because no spheres were found. It will result in suboptimal performances, consider setting a positive verletDist in your script.
Appreciate if anyone could guide me in solving this. The script is as
follows:
# ========= Script ===================
from yade import pack,ymport
import gts
#Add material for spheres
m=FrictMat(young = 1E8, poisson = 0.25, frictionAngle = 0.0, density = 2650)
# import surface
surf=gts.read(open('/home/Desktop/SphereClumping/sample.gts'))
# parameters for radom packing in imported surface
memoizeDb='/tmp/gts-packings.sqlite'
sp=SpherePack()
# generate lists of spheres and outer surface
if surf.is_closed():
O1=O.bodies.append(pack.gtsSurface2Facets(surf,fixed=False,noBound=True,material=m))
sp=pack.randomDensePack(pack.inGtsSurface(surf),radius=0.00005,rRelFuzz=0.000005,memoizeDb=memoizeDb,returnSpherePack=True)
Otemp=sp.toSimulation()
#clump spheres and surface together
idClump=O.bodies.clump(Otemp)
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop(
# handle sphere+sphere and facet+sphere collisions
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.4),
]
# set timestep to a fraction of the critical timestep
O.dt=0.5*PWaveTimeStep()
# save the simulation, so that it can be reloaded later, for experimentation
O.saveTmp()
from yade import qt
qt.View()
--
You received this question notification because your team yade-users is
an answer contact for Yade.