← Back to team overview

yade-users team mailing list archive

Re: requestErase()

 

I attach the simple script, if you have one minute time just run it and
display bounding boxes using Yade mask.
Typing O.interactions[0,1] will return you the instance although particles
do not touch.

On 28 June 2010 14:46, chiara modenese <c.modenese@xxxxxxxxx> wrote:

> Hi all,
>
> quick question about function requestErase() used into constitutive laws.
> What is this function exactly doing? I ask because I though it would have
> deleted the interaction at the next time step if overlapping no longer
> exists (or whatever condition has to be satisfied inside the contact law)
> and if the interaction is also not a potential one accoring to the collider.
> I am trying simple impact tests between balls with various contact laws and
> what I have seen is that, even after calling the function requestErase() and
> say after few cycles so that bounding boxes are no more overlapping anyhow
> after the impact, if I call in python
>
> O.interactions[id1,id2]
>
> I cant still get the instance, though non real if I guess isReal attribute.
> Why is this instance still exisiting? Particles are far apart and bounding
> boxes no more overlapping at all.
>
> Thanks for your answer.
>
> Chiara
>
#!/usr/local/bin/yade-trunk -x
# -*- coding: utf-8 -*-
# -*- encoding=utf-8 -*-

# Impact elastic test between two equal spheres
from yade import utils
import math

#__________________________________________________________________
# geometry
r=100.e-6 # radii [m]
# decide center positions
teta=15 # impact angle
p1,p2=[0,0,0],[cos(radians(teta))*2.*r,sin(radians(teta))*2.*r,0] # center positions [m] 
Gl1_Sphere.glutStacks=12
Gl1_Sphere.glutSlices=24
#__________________________________________________________________
# material
young=70.e9 # [N/m^2]
poisson=0.3 
density=2.65e-6 # [kg/m^3]
frictionAngle=radians(25) # [rad]

# append geometry and material
O.materials.append(FrictMat(young=young,poisson=poisson,density=density,frictionAngle=frictionAngle))
O.bodies.append(utils.sphere(p1,r,dynamic=True,wire=True)) # body id=0 
O.bodies.append(utils.sphere(p2,r,dynamic=True,wire=True)) # body id=1

# assign initial velocity
O.bodies[0].state.vel=(0,5000,0)
O.bodies[1].state.vel=(0,-5000,0)

#__________________________________________________________________
# list of engines
O.engines=[
	ForceResetter(),
	BoundDispatcher([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
	InsertionSortCollider(),
	InteractionDispatchers(
		[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
		[Ip2_FrictMat_FrictMat_FrictPhys()],
		[Law2_ScGeom_FrictPhys_Basic()]
	),
	NewtonIntegrator(damping=0.0),
]

#__________________________________________________________________
# time step
O.dt=.1*utils.PWaveTimeStep()
O.saveTmp('init')

#__________________________________________________________________
from yade import qt
qt.View()
qt.Controller()

O.run()





Follow ups

References