← Back to team overview

yade-users team mailing list archive

[Question #220785]: Contact with AllowBiggerThanPeriod

 

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

Hello,
I've noticed a weird behaviour that I cannot explain.  Below there is a simple script reproducing the problem.

I have two spheres in a periodic cell.  One sphere (blue in my script) is bigger than the period, so I am using the condition AllowBiggerThanPeriod=True.  A vertical force is applied on the big blue sphere, which then pushes the other (red) one downwards.
The problem comes when the width of the cell is exactly the same as the diameter of the big blue sphere, or slightly smaller. In these cases I have no interaction between the two sphere: one spheres goes through the other, and then the big sphere reaches the end of the cell, is remapped on the other side, and only at the second time finally hits the other ball.
And this only happens when the width of the cell is between 0.6 and 1 time the diameter of the sphere, and when I generated the big blue sphere first and the small red sphere after.
I am aware that it is a really specific case, but still I do not understand why it happens.. am I missing something? And why does the order in which I'm generating the particles affect the test?

Thank you very much
Giulia


#!/usr/bin/python
# -*- coding: utf-8 -*-

DbigSphere	= 1.
radius_bigSphere= DbigSphere/2
radius_sph	= DbigSphere/10

# Periodic cell
#cell0	= DbigSphere*1.000000000000001		# ok - Anything bigger than that works fine
#cell0	= DbigSphere*0.605					        # ok - Anything smaller than that works fine
cell0	= DbigSphere*1				# does NOT work
cell1	= DbigSphere*3.
cell2	= DbigSphere*3
O.periodic	= True
O.cell.setBox(Vector3(cell0,cell1,cell2)) 

# Big blue sphere
center_bigSphere	= Vector3(cell0/2.,cell1/2.,cell2*0.7)
bigSphere	= utils.sphere(center=center_bigSphere, radius=radius_bigSphere, color=(0,0,1))

# Red small sphere
center_sph	= Vector3(center_bigSphere[0],	center_bigSphere[1]+1./5.*DbigSphere,	center_bigSphere[2]-DbigSphere/2.-radius_sph)
sphere		= utils.sphere(center=center_sph, radius=radius_sph, color=(1,0,0))

#O.bodies.append((sphere,bigSphere))		# ok
O.bodies.append((bigSphere,sphere))		# does NOT work

O.engines=[
	ForceResetter(),
	InsertionSortCollider ([Bo1_Sphere_Aabb()], allowBiggerThanPeriod=True),
	InteractionLoop ([Ig2_Sphere_Sphere_ScGeom()],[Ip2_FrictMat_FrictMat_MindlinPhys(),],[Law2_ScGeom_MindlinPhys_Mindlin()]),
	ForceEngine (force=(0,0,-100),ids=[bigSphere.id]),
	NewtonIntegrator (damping=0.5),
	PyRunner (command='recordFirstInteraction()',iterPeriod=1),
]

flagRFI	= 0
def recordFirstInteraction():
	global flagRFI,iterFirst
	try:
		i=O.interactions[bigSphere.id,sphere.id]
		print'i.isReal ?',i.isReal,'\tStep',O.iter
		if i.isReal:
			if flagRFI==0:
				iterFirst=O.iter; 	print'iter first interaction\tStep',O.iter,' tOverlap',O.interactions[bigSphere.id,sphere.id].geom.penetrationDepth
				flagRFI=1
				O.pause()
	except StandardError:
		i=0

O.dt=0.2*utils.PWaveTimeStep()

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.