yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #24948
[Question #695454]: Polyhedra Coefficient of Restitution
New question #695454 on Yade:
https://answers.launchpad.net/yade/+question/695454
I am trying to fill a box with a mixture of spheres and polyhedra. Once the particles hit the bottom of the box, they seem to explode and fly all over the place. What am I doing wrong in this simulation?
from yade import pack,plot,ymport,export,polyhedra_utils
#define materials
id_matSpheres = O.materials.append(FrictMat(
young=1.0e9,
frictionAngle=radians(25),
density=2160,
poisson=0.3,
))
matPoly = PolyhedraMat(
young=1.0e9,
frictionAngle=radians(25),
density=2160,
poisson=0.3,
)
id_matPoly = O.materials.append(matPoly)
# Add box to hold our particles
O.bodies.append(geom.facetBox((.5,.5,.5),(.5,.5,2),wallMask=31))
# Create cloud of spheres
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(1,1,1),rMean=.05,rRelFuzz=.5)
# Replace large spheres by polys
for pos,radius in sp:
if radius > 0.04:
t = polyhedra_utils.polyhedra(matPoly,(radius,radius,radius))
t.state.pos = pos
O.bodies.append(t)
else:
O.bodies.append(utils.sphere(pos,radius))
#export the initial packing
vtkExporter = export.VTKExporter('Mixed.vtk')
vtkExporter.exportSpheres(ids='all', what=dict(speed='b.state.vel.norm()'))
vtkExporter.exportPolyhedra(ids='all', what=dict(speed='b.state.vel.norm()'))
vtkExporter.exportFacets()
O.engines=[
ForceResetter(),
InsertionSortCollider([
Bo1_Polyhedra_Aabb(),
Bo1_Sphere_Aabb(),
Bo1_Facet_Aabb()
],verletDist=(2.0e-3),label='collider',ompThreads=1),
InteractionLoop(
[
Ig2_Sphere_Polyhedra_ScGeom(),
Ig2_Sphere_Sphere_ScGeom(),
Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),
Ig2_Facet_Polyhedra_PolyhedraGeom(),
Ig2_Facet_Sphere_ScGeom(),
],
[
Ip2_FrictMat_FrictMat_MindlinPhys(en=0.3, gamma=0.4, krot=0.3),
Ip2_FrictMat_PolyhedraMat_FrictPhys(),
Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys(),
],
[
Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True, includeAdhesion=True),
Law2_ScGeom_FrictPhys_CundallStrack(),
Law2_PolyhedraGeom_PolyhedraPhys_Volumetric(),
],
),
NewtonIntegrator(damping=0.0,gravity=[0,0,-9.81]),
PyRunner(command='ExportResults()', label='exportres', iterPeriod=2000),
]
def ExportResults():
vtkExporter.exportSpheres(ids='all', what=dict(speed='b.state.vel.norm()'))
vtkExporter.exportPolyhedra(ids='all', what=dict(speed='b.state.vel.norm()'))
vtkExporter.exportFacets()
O.dt=.5*polyhedra_utils.PWaveTimeStep()
O.stopAtIter=80000
O.run()
--
You received this question notification because your team yade-users is
an answer contact for Yade.