← Back to team overview

yade-users team mailing list archive

[Question #670258]: sphere fall down to node-net

 

New question #670258 on Yade:
https://answers.launchpad.net/yade/+question/670258

I try to simulate a sphere go at a fixed velocity, and a net below the sphere.
I write codes like this:
------------------------------------------------------O.reset()
from yade import pack,geom,qt
from yade.gridpfacet import *

rad,gap=.25,.005
#Parameters, which will be passed into spheres and facets creators
kw={'material':0}
kwBoxes={'color':[1,0,0],'wire':False,'dynamic':True,'material':0}
kwMeshes={'color':[1,0,0],'wire':True,'dynamic':False,'material':0}
O.materials.append(FrictMat(young=10e9,poisson=.25,frictionAngle=0.5,density=1e3,label='sphere'))
O.materials.append(CohFrictMat(young=3e2,poisson=0.3,density=1e1,frictionAngle=10,normalCohesion=1e7,shearCohesion=1e7,momentRotationLaw=True,label='spheremat'))

O.engines=[
ForceResetter(),
InsertionSortCollider([
Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_GridConnection_Aabb(),
]), 
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_GridNode_GridNode_GridNodeGeom6D(),Ig2_Sphere_GridConnection_ScGridCoGeom(),Ig2_GridConnection_GridConnection_GridCoGridCoGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False)],
[Law2_ScGeom_FrictPhys_CundallStrack(),Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),Law2_ScGridCoGeom_FrictPhys_CundallStrack()]
  ),
NewtonIntegrator(gravity=(0,0,0),damping=0.3,label='newton')
   ]


### Parameters of a rectangular grid ###
L=11 #length [m]
l=11 #width [m]
nbL=11 #number of nodes for the length [#]
nbl=11 #number of nodes for the width [#]
r=L/100. #radius
color=[255./255.,102./255.,0./255.]
nodesIds=[]

#Create all nodes first :
for i in range(0,nbL):
 for j in range(0,nbl):
   nodesIds.append(O.bodies.append(gridNode([i*L/nbL,j*l/nbl,0],r,wire=False,fixed=False, material='spheremat',color=color)) )

#Create connection between the nodes
for i in range(0,len(nodesIds)):
 for j in range(i+1,len(nodesIds)):
   dist=(O.bodies[i].state.pos-O.bodies[j].state.pos).norm()
   if(dist<=L/nbL*1.01):
           O.bodies.append( gridConnection(i,j,r,color=color) )


O.bodies.append(sphere([5.5,5.5,1],1))
O.bodies[341].state.blockedDOFs='XYZxyz'
O.bodies[341].state.vel=(0,0,-1)

-----------------------------------------------------------------------------
my YADE-version is 2017.01a. When the sphere contact the net, the terminate is crush, and give me messages like this :
----------------------------------------------------------------------------

/home/dj/yade/trunk/lib/multimethods/DynLibDispatcher.hpp:344: ambiguous 2d dispatch (arg1=ScGridCoGeom, arg2=CohFrictPhys, distance=1), dispatch matrix:
AMBIGUOUS: 1+3 -> Law2_ScGeom_FrictPhys_CundallStrack
AMBIGUOUS: 2+5 -> Law2_ScGeom6D_CohFrictPhys_CohesionMoment
AMBIGUOUS: 7+5 -> Law2_ScGeom6D_CohFrictPhys_CohesionMoment
AMBIGUOUS: 11+3 -> Law2_ScGridCoGeom_FrictPhys_CundallStrack
AMBIGUOUS: 11+5 -> Law2_ScGridCoGeom_FrictPhys_CundallStrack
terminate called after throwing an instance of 'std::runtime_error'
  what():  Ambiguous dispatch.
-------------------------------------------------------------------------------
Can you give me some suggestion? 


-- 
You received this question notification because your team yade-users is
an answer contact for Yade.