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

I would like to have cylinders moving on a conveyor belt (horizontal wall with 
given velocity) and colliding with lateral walls (facetboxes). I am trying to 
compare the performance of two kinds of cylnders: clumps of spheres and 
gridpfacets. I prepared this basic script. The clumps do all I wish (they are 
transported by the conveyor horizontal wall, interact with the lateral 
facetboxes and among themselves). The gridpfacet cylinder is not transported 
(it seems it does not interact with the horizontal wall neither with the 
newtonintegrator). If I impose a velocity to it - uncommenting the commented 
line - (perhaps not in a very smart way), I see a part of the cylinder moving 
but it does not interact with the walls or with the spheres.

--------------------------------------------------------------------------------------------------------

from yade import pack,ymport,export,geom,bodiesHandling
from yade.gridpfacet import *

rad,gap=.05,.01
r=0.5           
phi=30. 
E=1e6   

O.materials.append(FrictMat(young=10e9,poisson=.25,frictionAngle=0.5,density=1e3))
O.materials.append( CohFrictMat( 
young=E,poisson=0.3,density=1000,frictionAngle=radians(phi),normalCohesion=1e10,shearCohesion=1e10,momentRotationLaw=True,label='cMat'
 ) ) 
O.materials.append( FrictMat( 
young=E,poisson=0.3,density=1000,frictionAngle=radians(phi),label='fMat' ) )  


kw={'material':0}
kwBoxes={'color':[1,0,0],'wire':False,'dynamic':False,'material':0}
kwMeshes={'color':[1,1,0],'wire':True,'dynamic':False,'material':0}


nodesIds=[]
cylIds=[]
color=[1,0,0]
cylgrid = 
cylinder((2,0,0.),(2,0,0.5),radius=r,nodesIds=nodesIds,cylIds=cylIds,fixed=False,color=color,intMaterial='cMat',extMaterial='fMat',mask=3)
# uncomment this to make the pfacet-cylinder move
# O.bodies[cylIds[0]].state.vel=Vector3(0,1,0)


cylTuple =  
O.bodies.appendClumped(pack.regularOrtho(pack.inCylinder((0,1,0),(0,1,0.5),0.5),radius=rad,gap=gap,color=(0,0,1),**kw))
O.bodies[cylTuple[0]].mask=3

cylTuple2 =  
O.bodies.appendClumped(pack.regularOrtho(pack.inCylinder((0,-1,0),(0,-1,0.5),0.5),radius=rad,gap=gap,color=(0,0,1),**kw))
O.bodies[cylTuple2[0]].mask=3

beltId = O.bodies.append(wall((0,0,0),axis=2))
O.bodies[beltId].state.vel=Vector3(-1,0,0)

wall1Id = 
O.bodies.append(geom.facetBox((0,-3,0),(1,5,5),orientation=Quaternion((0, 0, 
1), (pi/2.4)),wallMask=2,**kwBoxes))
wall2Id = 
O.bodies.append(geom.facetBox((0,+3,0),(1,5,5),orientation=Quaternion((0, 0, 
1), (-pi/2.4)),wallMask=2,**kwBoxes))


O.engines=[
        ForceResetter(),
        
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb(),  
                               Bo1_GridConnection_Aabb(),                       
                               Bo1_PFacet_Aabb(),                               
        ],label='collider'),
        InteractionLoop(
                
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom(), 
                 Ig2_Wall_PFacet_ScGeom(),  
                 Ig2_GridNode_GridNode_GridNodeGeom6D(),
                 Ig2_GridConnection_GridConnection_GridCoGridCoGeom(),  
                 Ig2_Sphere_PFacet_ScGridCoGeom(),      
                 Ig2_GridConnection_PFacet_ScGeom(),    
                 Ig2_Sphere_GridConnection_ScGridCoGeom(),
                ],
                [Ip2_FrictMat_FrictMat_FrictPhys(),    
                ],  
                [Law2_ScGeom_FrictPhys_CundallStrack(),     
                 Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),
                 Law2_ScGridCoGeom_FrictPhys_CundallStrack(),   
                 Law2_GridCoGridCoGeom_FrictPhys_CundallStrack()
                ],
        ),
        
NewtonIntegrator(damping=.1,exactAsphericalRot=True,gravity=(1e-2,1e-2,-1000),mask=2),
        GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.1,label='ts'), 
]
O.dt=PWaveTimeStep()
O.run(1,True)
try:
        from yade import qt
        qt.Controller()
        qt.View()
except ImportError: pass
O.saveTmp()
O.timingEnabled=True

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

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to