Question #629486 on Yade changed:
https://answers.launchpad.net/yade/+question/629486

    Status: Answered => Open

Ed Carlos Alves Rocha is still having a problem:
I did the Cylinder example, however, I do not know give the imput of
collision detection for this example. Can you take a look and see what
impact collision between the cylinders and the wall?

Thank you very much for your attention.

from yade.gridpfacet import *

#### Parameter ####
L=1.            # length of the cylinder element
r=0.1           # radius of the cylinder element
phi=30. # friction angle
E=1e6           # Young's modulus 


idCana=O.materials.append(FrictMat(young=3.4e6,poisson=.3,frictionAngle=.6, 
density=4.5e2,label="cana"))
idSteel=O.materials.append(FrictMat(young=210e9,poisson=.25,frictionAngle=.8,density=7.85e3,label="steel"))

O.bodies.append(geom.facetBox((0,0,0),(3,3,3),wallMask=31,material="steel"
))

#### Engines ####
O.engines=[
        ForceResetter(),
        
InsertionSortCollider([Bo1_GridConnection_Aabb(),Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),
 Bo1_Wall_Aabb()]),
        InteractionLoop([
                Ig2_GridNode_GridNode_GridNodeGeom6D(),
                Ig2_GridConnection_GridConnection_GridCoGridCoGeom(),
                Ig2_Sphere_Sphere_ScGeom(),
                Ig2_Facet_Sphere_ScGeom(),
Ig2_Wall_Sphere_ScGeom()
        ],
        [
        
Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=True),
                Ip2_FrictMat_FrictMat_FrictPhys()],
        [
        Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),
                Law2_ScGeom_FrictPhys_CundallStrack(),
                Law2_ScGridCoGeom_FrictPhys_CundallStrack(),
                Law2_GridCoGridCoGeom_FrictPhys_CundallStrack()
     ]),
        NewtonIntegrator(gravity=(-0.,0,-10),damping=0.5,label='newton'),
]

#### Creat materials ####
O.materials.append( CohFrictMat( 
young=E,poisson=0.3,density=1000,frictionAngle=radians(phi),normalCohesion=1e10,shearCohesion=1e10,momentRotationLaw=True,label='cMat'
 ) )  # material to create the gridConnections
O.materials.append( FrictMat( 
young=E,poisson=0.3,density=1000,frictionAngle=radians(phi),label='fMat' ) )  # 
material for general interactions

#### Create cylinders ####
nodesIds=[]
cylIds=[]
cylinder((0,0,0),(L,0,0),radius=r,nodesIds=nodesIds,cylIds=cylIds,
                                 
fixed=False,color=[1,0,0],intMaterial='cMat',extMaterial='fMat')
cylinder((L/4,2*L/3,L),(L/4,-L/3,L),radius=r,nodesIds=nodesIds,cylIds=cylIds,
                                 
fixed=False,color=[0,1,0],intMaterial='cMat',extMaterial='fMat')
cylinder((0,2*L/3,L),(0,-L/3,L),radius=r,nodesIds=nodesIds,cylIds=cylIds,
                                 
fixed=False,color=[0,1,0],intMaterial='cMat',extMaterial='fMat')
cylinder((L/2,L/2,L),(L/2,-L/2,L),radius=r,nodesIds=nodesIds,cylIds=cylIds,
                                 
fixed=False,color=[0,1,1],intMaterial='cMat',extMaterial='fMat')
cylinder((3*L/4,L/3,L),(3*L/4,-2*L/3,L),radius=r,nodesIds=nodesIds,cylIds=cylIds,
                                 
fixed=False,color=[0,0,1],intMaterial='cMat',extMaterial='fMat')
cylinder((L,L/3,L),(L,-2*L/3,L),radius=r,nodesIds=nodesIds,cylIds=cylIds,
                                 
fixed=False,color=[0,0,1],intMaterial='cMat',extMaterial='fMat')

#### For viewing ####
from yade import qt
qt.View()
Gl1_Sphere.stripes=True

#### Set a time step ####
O.dt=1e-06

#### Allows to reload the simulation ####
O.saveTmp()

-- 
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     : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to