← Back to team overview

yade-users team mailing list archive

Re: [Question #286518]: Interaction sphere grid.

 

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

    Status: Answered => Open

tala is still having a problem:
Hi Jerome, 
Thank you for your answer, It is not working.
The problem is that the interaction is detected and is happening but when the grid is falling it does not stabilizes on the grains layer it continues to fall without to stop. this is the full code you can test it.
# encoding: utf-8

from yade import pack,geom,qt
from pylab import *
qt.View()
DENS=3000
YOUNG=3e6
def wallMat(): return FrictMat(young=YOUNG,frictionAngle=radians(0),density=DENS)


O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.2,label='aabb'),
		Bo1_GridConnection_Aabb(),Bo1_Box_Aabb()
	]),
	InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom(),Ig2_GridNode_GridNode_GridNodeGeom6D(),Ig2_Box_Sphere_ScGeom(),Ig2_Sphere_GridConnection_ScGridCoGeom()],
		[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False),Ip2_FrictMat_FrictMat_FrictPhys()],
		[Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),Law2_ScGeom_FrictPhys_CundallStrack(),Law2_ScGridCoGeom_CohFrictPhys_CundallStrack()]
	),
        GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.5),
	NewtonIntegrator(gravity=(0,0,-0.1),damping=0.9,label='newton',mask=1)
]
L=0.1 #length [m]
l=0.05	#width	[m]
sp=pack.SpherePack()
O.materials.append(CohFrictMat(young=3e6,poisson=0.3,density=5000,frictionAngle=radians(30),normalCohesion=1e20,shearCohesion=1e20,momentRotationLaw=True,label='spheremat'))
O.materials.append(FrictMat(young=3e7,poisson=0.3,frictionAngle=radians(30),density=5000,label='spheres'))


### Parameters of a rectangular grid ###
L=0.1 #length [m]
l=0.05	#width	[m]
nbL=10	#number of nodes for the length	[#]
nbl=5	#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.020],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) )
xinf=-0.0010
xsup=L+0.001
X=xsup-xinf

yinf=-0.001
ysup=l+0.001
Y=ysup-yinf

zinf=-0.1
zsup=0.05
Z=zsup-zinf

oversizeFactor=2
thickness=0.001

O.bodies.append(utils.box(center=(xinf-thickness,ysup,zinf+Z/2.),extents=(thickness,oversizeFactor*Y/2,oversizeFactor*Z/2),material=wallMat,fixed=True,wire=True))
O.bodies.append(utils.box(center=(xsup+thickness,ysup,zinf+Z/2.),extents=(thickness,oversizeFactor*Y/2,oversizeFactor*Z/2),material=wallMat,fixed=True,wire=True))
O.bodies.append(utils.box(center=(xsup/2,ysup,zinf-thickness),extents=(oversizeFactor*X/2,oversizeFactor*Y/2,thickness),material=wallMat,fixed=True,wire=True))
O.bodies.append(utils.box(center=(xsup+thickness,yinf,zinf+Z/2.),extents=(thickness,oversizeFactor*Y/2,oversizeFactor*Z/2),material=wallMat,fixed=True,wire=True))
O.bodies.append(utils.box(center=(xinf-thickness,yinf,zinf+Z/2.),extents=(thickness,oversizeFactor*Y/2,oversizeFactor*Z/2),material=wallMat,fixed=True,wire=True))
O.bodies.append(utils.box(center=(xsup/2,yinf,zinf-thickness),extents=(oversizeFactor*X/2,oversizeFactor*Y/2,thickness),material=wallMat,fixed=True,wire=True))
O.bodies.append(utils.box(center=(xsup/2,ysup,zsup/2),extents=(oversizeFactor*X/2,thickness,oversizeFactor*Z/2),material=wallMat,fixed=True,wire=True))
O.bodies.append(utils.box(center=(xsup/2,yinf,zsup/2),extents=(oversizeFactor*X/2,thickness,oversizeFactor*Z/2),material=wallMat,fixed=True,wire=True))
num1=sp.makeCloud((0,0,0.03),(L,l,0.03+0.1),rRelFuzz=0.1,rMean=0.01,num=2000,periodic=False,seed=1)
num=sp.makeCloud((0,0,-0.08),(L,l,-0.08+0.1),rRelFuzz=0.1,rMean=0.01,num=2000,periodic=False,seed=1)
O.bodies.append([sphere(s[0],s[1],material='spheres') for s in sp])

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