← Back to team overview

yade-users team mailing list archive

Re: [Question #293342]: Problem with simulation

 

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

    Status: Answered => Open

Alex is still having a problem:
Hello Jérôme and Klauss,

Thank you for the answers. They have helped a lot. I'm sorry for the
delay in replying and for the title... The next time I will be more
specific and more original. ;-)

I rewrote my code and I continue with the same problem, that is, when I
run the simulation the cylinder goes inside the spheres and that's not
what I want.

Once again, I ask if someone could help in this problem. Below is my new
code.

import sys
from yade import ymport
from yade import qt
from numpy import linspace

#### material definition ####
def sphereMat(): 
	return 	CohFrictMat(young=8e5,poisson=0.3,density=4e3,
	frictionAngle=radians(30),normalCohesion=4e4,shearCohesion=1e5,momentRotationLaw=False,label='sphereMat')
	
def gridNodeMat():
	return CohFrictMat(young=8e5,poisson=0.3,density=4e3,frictionAngle=radians(30),
	normalCohesion=1e5,shearCohesion=1e5,momentRotationLaw=True,label='gridNodeMat')
	
def gridCoMat():
	return CohFrictMat(young=8e5,poisson=0.3,density=4e3, frictionAngle=radians(30),
	normalCohesion=1e5,shearCohesion=1e5,momentRotationLaw=True,label='gridCoMat')
#### end material definition ###	 
	

O.engines=[
	ForceResetter(),
	InsertionSortCollider([
		Bo1_GridConnection_Aabb(),
		Bo1_Sphere_Aabb()
	]),
	InteractionLoop(
		#### Geometric interactions
		[
		Ig2_GridNode_GridNode_GridNodeGeom6D(),
		Ig2_Sphere_GridConnection_ScGridCoGeom()
		
		],
		
		[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=True),
		],
		
		[Law2_ScGeom6D_CohFrictPhys_CohesionMoment(label='law'),
		 Law2_ScGridCoGeom_CohFrictPhys_CundallStrack()		
		]
	),
	#### Motion equation
	NewtonIntegrator(damping=0.4,gravity=[0,0,0]),
	PyRunner(command='main()',iterPeriod=10)
]

O.dt=1e-7

rCyl=0.025
nL= 2
L=0.3

#### Create all nodes first :
nodesIds=[]
for i in linspace(0,L,nL):
  nodesIds.append( O.bodies.append(
    gridNode([0.3,i + 0.4,2.02],rCyl,wire=False,fixed=False,material=gridNodeMat) ) )

#### Now create connection between the nodes
for i,j in zip( nodesIds[:-1], nodesIds[1:]):
  O.bodies.append( gridConnection(i,j,rCyl,
                                  material=gridCoMat
                                  ) )

#### read a sphere's package 
PACKING = '10K_P1'
O.bodies.append(ymport.text(PACKING+'.spheres',scale=1.,shift=Vector3(0,0,0),material=sphereMat))

qt.View();

def main():
	global Fn,Ft
	O.bodies[0].dynamic=False
	O.bodies[0].state.vel[2]=-500.0
	O.bodies[1].state.vel[2]=-500.0
	O.bodies[2].state.vel[2]=-500.0

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