yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #18334
Re: [Question #675879]: Polyhedron interaction with sphere
Question #675879 on Yade changed:
https://answers.launchpad.net/yade/+question/675879
Robert Caulk posted a new comment:
Thank you for putting together a nice MWE showcasing this problem. I
looked into your MWE and I believe you found a bug. I am sharing a more
dramatic (and concise) MWE below for others who wish to look into this.
In this example, setting eps_pos of 1e-5 results in the sphere
interacting with the polyhedra. Then, simply changing eps_pos to 0
results in the sphere passing through the polyhedron.
I will spend some more time sifting through the source code to identify
the bug. I suspect it is somewhere in the collision identification [1].
I will let you know if I find anything, otherwise, we might need one of
Yade's polyhedra specialists to look at this.
#--------------------
from yade import pack,polyhedra_utils
import shutil, sys, imp
import numpy as np
#------------------- System definition ----------------------
rad_p = 0.1
Xl = 0.
Yl = 0.
Xr = 1.
Yr = 1.
Zl = rad_p
Zr = 1.
eps_pos = 1e-5
#--------------------------
polyMat = PolyhedraMat(young=1e10,poisson=.05)
frictMat = FrictMat(young=1e9,poisson=.2)
O.materials.append((polyMat,frictMat))
O.bodies.append([sphere((0.5*(Xl+Xr)+eps_pos,0.5*(Yl+Yr),-rad_p),rad_p,
dynamic=True,material=frictMat) ]) # Sphere object
O.bodies.append(polyhedron([(Xl,Yl,Zl),(Xr,Yl,Zl),(Xl,Yr,Zl),(Xr,Yr,Zl),(Xl,Yl,Zr),(Xr,Yl,Zr),(Xl,Yr,Zr),(Xr,Yr,Zr)],wire=False,dynamic=True,material=polyMat)) # polyhedron which compresses the sphere
#------------------------------------
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Polyhedra_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Polyhedra_ScGeom()],
[Ip2_FrictMat_PolyhedraMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()],
),
#PyRunner(command = 'load()', iterPeriod = 1, label = "checker"),
NewtonIntegrator()
]
O.bodies[1].state.blockedDOFs = 'xyzXYZ'
O.bodies[0].state.vel = Vector3(0,0,1e-1)
#---------------------------
O.dt=.5*PWaveTimeStep()
O.step()
#-------------------
[1]https://github.com/yade/trunk/blob/master/pkg/dem/Polyhedra_Ig2.cpp#L342
--
You received this question notification because your team yade-users is
an answer contact for Yade.